initial commit
674
Cartomancer-v.4.10-fix-fix/LICENSE
Normal file
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
46
Cartomancer-v.4.10-fix-fix/README.md
Normal file
|
@ -0,0 +1,46 @@
|
|||
## Requirements
|
||||
- [Lovely](https://github.com/ethangreen-dev/lovely-injector) - a Balatro injector.
|
||||
|
||||
## Installation
|
||||
1. Install [Lovely](https://github.com/ethangreen-dev/lovely-injector?tab=readme-ov-file#manual-installation).
|
||||
2. Download the [latest release](https://github.com/stupxd/Cartomancer/releases/) of this mod.
|
||||
3. Unzip the folder, and move it into the `%appdata%/Balatro/Mods` folder.
|
||||
4. Restart the game to load the mod.
|
||||
|
||||
## Features
|
||||
1. Limit amount of cards visible in your deck pile, to make it appear smaller. Default limit is 100 cards, which can be modified in mod config menu.
|
||||
|
||||

|
||||
|
||||
|
||||
2. Improved deck view
|
||||
|
||||
- Stack identical playing cards, which looks much cleaner and improves performance.
|
||||
|
||||

|
||||
|
||||
- Optionally, stack cards regardless of modifier, if your deck has tons of unique cards.
|
||||
- Hide drawn cards from deck view
|
||||
|
||||
4. Custom scoring flames intensity and SFX volume.
|
||||
|
||||
5. Hide non-essential (edition) shaders.
|
||||
|
||||
6. Improved jokers management
|
||||
|
||||
- Option to hide all jokers (improves performance at 100+ jokers).
|
||||
|
||||
- Zoom into the jokers area for easier jokers management and navigation.
|
||||
|
||||

|
||||
|
||||
Settings for this mod can be found under `Mods` tab, if you use Steamodded 1.0.0 - find `Cartomancer`, and open `Config` tab.
|
||||
|
||||
If you play vanilla, go to `Settings` and open  tab.
|
||||
|
||||
## Credits
|
||||
|
||||
[Jen Walter](https://github.com/jenwalter666/) for the code for UI box on stacked cards.
|
||||
|
||||
[Mysthaps](https://github.com/Mysthaps/) for most of the initial mod config code.
|
||||
|
BIN
Cartomancer-v.4.10-fix-fix/assets/1x/modicon.png
Normal file
After Width: | Height: | Size: 461 B |
BIN
Cartomancer-v.4.10-fix-fix/assets/1x/settings.png
Normal file
After Width: | Height: | Size: 526 B |
BIN
Cartomancer-v.4.10-fix-fix/assets/2x/modicon.png
Normal file
After Width: | Height: | Size: 474 B |
BIN
Cartomancer-v.4.10-fix-fix/assets/2x/settings.png
Normal file
After Width: | Height: | Size: 342 B |
75
Cartomancer-v.4.10-fix-fix/cartomancer.lua
Normal file
|
@ -0,0 +1,75 @@
|
|||
require 'cartomancer.init'
|
||||
|
||||
Cartomancer.path = assert(
|
||||
Cartomancer.find_self('cartomancer.lua'),
|
||||
"Failed to find mod folder. Make sure that `Cartomancer` folder has `cartomancer.lua` file!"
|
||||
)
|
||||
|
||||
Cartomancer.load_mod_file('internal/config.lua', 'internal.config')
|
||||
Cartomancer.load_mod_file('internal/atlas.lua', 'internal.atlas')
|
||||
Cartomancer.load_mod_file('internal/ui.lua', 'internal.ui')
|
||||
Cartomancer.load_mod_file('internal/keybinds.lua', 'internal.keybinds')
|
||||
|
||||
Cartomancer.load_mod_file('core/view-deck.lua', 'core.view-deck')
|
||||
Cartomancer.load_mod_file('core/flames.lua', 'core.flames')
|
||||
Cartomancer.load_mod_file('core/optimizations.lua', 'core.optimizations')
|
||||
Cartomancer.load_mod_file('core/jokers.lua', 'core.jokers')
|
||||
Cartomancer.load_mod_file('core/hand.lua', 'core.hand')
|
||||
|
||||
Cartomancer.load_config()
|
||||
|
||||
Cartomancer.INTERNAL_jokers_menu = false
|
||||
|
||||
-- TODO dedicated keybinds file? keybinds need to load after config
|
||||
Cartomancer.register_keybind {
|
||||
name = 'hide_joker',
|
||||
func = function (controller)
|
||||
Cartomancer.hide_hovered_joker(controller)
|
||||
end
|
||||
}
|
||||
|
||||
Cartomancer.register_keybind {
|
||||
name = 'toggle_tags',
|
||||
func = function (controller)
|
||||
Cartomancer.SETTINGS.hide_tags = not Cartomancer.SETTINGS.hide_tags
|
||||
Cartomancer.update_tags_visibility()
|
||||
end
|
||||
}
|
||||
|
||||
Cartomancer.register_keybind {
|
||||
name = 'toggle_consumables',
|
||||
func = function (controller)
|
||||
Cartomancer.SETTINGS.hide_consumables = not Cartomancer.SETTINGS.hide_consumables
|
||||
end
|
||||
}
|
||||
|
||||
Cartomancer.register_keybind {
|
||||
name = 'toggle_deck',
|
||||
func = function (controller)
|
||||
Cartomancer.SETTINGS.hide_deck = not Cartomancer.SETTINGS.hide_deck
|
||||
end
|
||||
}
|
||||
|
||||
Cartomancer.register_keybind {
|
||||
name = 'toggle_jokers',
|
||||
func = function (controller)
|
||||
if not (G and G.jokers) then
|
||||
return
|
||||
end
|
||||
G.jokers.cart_hide_all = not G.jokers.cart_hide_all
|
||||
|
||||
if G.jokers.cart_hide_all then
|
||||
Cartomancer.hide_all_jokers()
|
||||
else
|
||||
Cartomancer.show_all_jokers()
|
||||
end
|
||||
Cartomancer.align_G_jokers()
|
||||
end
|
||||
}
|
||||
|
||||
Cartomancer.register_keybind {
|
||||
name = 'toggle_jokers_buttons',
|
||||
func = function (controller)
|
||||
Cartomancer.SETTINGS.jokers_controls_buttons = not Cartomancer.SETTINGS.jokers_controls_buttons
|
||||
end
|
||||
}
|
72
Cartomancer-v.4.10-fix-fix/config.lua
Normal file
|
@ -0,0 +1,72 @@
|
|||
|
||||
return {
|
||||
compact_deck_enabled = true,
|
||||
compact_deck_visible_cards = 100,
|
||||
|
||||
deck_view_stack_enabled = true,
|
||||
deck_view_stack_modifiers = false,
|
||||
deck_view_stack_chips = true,
|
||||
-- [top center bottom]
|
||||
deck_view_stack_pos_vertical = 't',
|
||||
-- [left middle right]
|
||||
deck_view_stack_pos_horizontal = 'm',
|
||||
-- Hex color code for x (before amount)
|
||||
deck_view_stack_x_color = 'ed7575',
|
||||
-- Opacity in %
|
||||
deck_view_stack_background_opacity = '60',
|
||||
|
||||
deck_view_hide_drawn_cards = false,
|
||||
-- todo: maybe custom shader for drawn cards to adjust opacity
|
||||
|
||||
improved_hand_sorting = false,
|
||||
draw_non_essential_shaders = true,
|
||||
hide_tags = false,
|
||||
hide_consumables = false,
|
||||
hide_deck = false,
|
||||
hide_jokers = false,
|
||||
|
||||
flames_intensity_min = 0.5,
|
||||
flames_intensity_max = 10,
|
||||
flames_relative_intensity = false,
|
||||
flames_slower_speed = false,
|
||||
flames_volume = 100,
|
||||
|
||||
jokers_controls_buttons = true,
|
||||
jokers_controls_show_after = 13,
|
||||
|
||||
keybinds = {
|
||||
hide_joker = {
|
||||
lalt = true,
|
||||
h = true,
|
||||
},
|
||||
toggle_tags = {['[none]'] = true},
|
||||
toggle_consumables = {['[none]'] = true},
|
||||
toggle_deck = {['[none]'] = true},
|
||||
toggle_jokers = {['[none]'] = true},
|
||||
toggle_jokers_buttons = {['[none]'] = true},
|
||||
},
|
||||
}
|
||||
|
||||
--[[
|
||||
--------- WIP / concepting
|
||||
|
||||
-- Stack cards in hand?
|
||||
hand_stack_enabled = true,
|
||||
hand_stack_after_total = 100,
|
||||
|
||||
-- stacked jokers?
|
||||
hide_jokers = {
|
||||
enabled = true,
|
||||
rarities = {
|
||||
common = true,
|
||||
uncommon = true,
|
||||
rare = false,
|
||||
},
|
||||
all = true,
|
||||
editions = {
|
||||
negative = true,
|
||||
},
|
||||
-- When total reaches this number, matching jokers will be hidden TODO : make sure to show jokers once the number's back down :)
|
||||
hide_after_total = 100,
|
||||
},
|
||||
]]
|
40
Cartomancer-v.4.10-fix-fix/core/flames.lua
Normal file
|
@ -0,0 +1,40 @@
|
|||
|
||||
|
||||
function Cartomancer.get_flames_intensity()
|
||||
local value
|
||||
if Cartomancer.SETTINGS.flames_relative_intensity then
|
||||
-- Scale intensity relative to the required score
|
||||
value = math.max(0., math.log(G.ARGS.score_intensity.earned_score/G.ARGS.score_intensity.required_score + 5, 5))
|
||||
else
|
||||
value = math.max(0., math.log(G.ARGS.score_intensity.earned_score, 5) - 2)
|
||||
end
|
||||
|
||||
if Cartomancer.SETTINGS.flames_intensity_max >= Cartomancer._INTERNAL_max_flames_intensity then
|
||||
return value
|
||||
end
|
||||
|
||||
return math.max(
|
||||
math.min(value, Cartomancer.SETTINGS.flames_intensity_max),
|
||||
Cartomancer.SETTINGS.flames_intensity_min
|
||||
)
|
||||
end
|
||||
|
||||
function Cartomancer.handle_flames_volume(value)
|
||||
return Cartomancer.SETTINGS.flames_volume/100. * value
|
||||
end
|
||||
|
||||
local function intensity_for_big_scores(real_intensity)
|
||||
local power = 0.55
|
||||
|
||||
real_intensity = math.max(0, real_intensity)
|
||||
|
||||
return math.max(0, math.min(6, real_intensity) + math.max(1, math.log(real_intensity)) ^ power) - 1.
|
||||
end
|
||||
|
||||
function Cartomancer.handle_flames_timer(timer, intensity)
|
||||
if not Cartomancer.SETTINGS.flames_slower_speed then
|
||||
return timer + G.real_dt*(1 + intensity*0.2)
|
||||
end
|
||||
|
||||
return timer + G.real_dt*(1 + intensity_for_big_scores(intensity)*0.7)
|
||||
end
|
70
Cartomancer-v.4.10-fix-fix/core/hand.lua
Normal file
|
@ -0,0 +1,70 @@
|
|||
-- Hand sorting
|
||||
|
||||
G.FUNCS.cartomancer_sort_hand_off = function(e)
|
||||
if G.hand.cart_sorting == false then
|
||||
G.hand.cart_old_sorting = G.hand.config.sort
|
||||
G.hand:sort('off')
|
||||
else
|
||||
G.hand.config.sort = G.hand.cart_old_sorting
|
||||
G.hand:sort()
|
||||
end
|
||||
end
|
||||
|
||||
local function is_desc(method)
|
||||
return string.find(method, "desc")
|
||||
end
|
||||
|
||||
local function is_suit(method)
|
||||
return string.find(method, "suit")
|
||||
end
|
||||
|
||||
local function is_sorted()
|
||||
-- TODO : check if hand is already sorted with current method
|
||||
return true
|
||||
end
|
||||
|
||||
local g_func_sort_hand_suit = G.FUNCS.sort_hand_suit
|
||||
G.FUNCS.sort_hand_suit = function(e)
|
||||
G.hand.cart_sorting = true
|
||||
if not Cartomancer.SETTINGS.improved_hand_sorting then
|
||||
return g_func_sort_hand_suit(e)
|
||||
end
|
||||
|
||||
local current = G.hand.config.sort
|
||||
local new = 'suit desc'
|
||||
|
||||
-- If already sorted by suit, toggle ascending/descending order
|
||||
if is_suit(current) and is_sorted() then
|
||||
if is_desc(current) then
|
||||
new = 'suit asc'
|
||||
else
|
||||
new = 'suit desc'
|
||||
end
|
||||
end
|
||||
|
||||
G.hand:sort(new)
|
||||
play_sound('paper1')
|
||||
end
|
||||
|
||||
local g_func_sort_hand_value = G.FUNCS.sort_hand_value
|
||||
G.FUNCS.sort_hand_value = function(e)
|
||||
G.hand.cart_sorting = true
|
||||
if not Cartomancer.SETTINGS.improved_hand_sorting then
|
||||
return g_func_sort_hand_value(e)
|
||||
end
|
||||
|
||||
local current = G.hand.config.sort
|
||||
local new = 'desc'
|
||||
|
||||
-- If already sorted by value, toggle ascending/descending order
|
||||
if not is_suit(current) and is_sorted() then
|
||||
if is_desc(current) then
|
||||
new = 'asc'
|
||||
else
|
||||
new = 'desc'
|
||||
end
|
||||
end
|
||||
|
||||
G.hand:sort(new)
|
||||
play_sound('paper1')
|
||||
end
|
253
Cartomancer-v.4.10-fix-fix/core/jokers.lua
Normal file
|
@ -0,0 +1,253 @@
|
|||
-- EXPAND JOKERS CARDAREA
|
||||
|
||||
|
||||
function Cartomancer.align_G_jokers()
|
||||
if not G or not G.jokers then
|
||||
return
|
||||
end
|
||||
-- Refresh controls
|
||||
if G.jokers.children.cartomancer_controls then
|
||||
G.jokers.children.cartomancer_controls:remove()
|
||||
G.jokers.children.cartomancer_controls = nil
|
||||
end
|
||||
G.jokers:align_cards()
|
||||
G.jokers:hard_set_cards()
|
||||
end
|
||||
|
||||
local old_slider_value = 0
|
||||
local slide_speedup = nil
|
||||
|
||||
function Cartomancer.expand_G_jokers()
|
||||
G.jokers.cart_zoom_slider = G.jokers.cart_zoom_slider or 0
|
||||
|
||||
local self_T_w = math.max(4.9*G.CARD_W, 0.6*#G.jokers.cards * G.CARD_W)
|
||||
local self_T_x = G.jokers.T.x - (self_T_w- 4.9*G.CARD_W) * G.jokers.cart_zoom_slider / 100
|
||||
|
||||
local self = G.jokers
|
||||
|
||||
for k, card in ipairs(self.cards) do
|
||||
if card.states.drag.is then
|
||||
local sign = nil
|
||||
if card.T.x < -1 then
|
||||
sign = -1
|
||||
elseif card.T.x > G.TILE_W then
|
||||
sign = 1
|
||||
end
|
||||
|
||||
if sign then
|
||||
slide_speedup = (slide_speedup or 1) + 0.01
|
||||
local shift = math.min(
|
||||
self_T_w / 3,
|
||||
4 * (slide_speedup ^ 1.7)
|
||||
)
|
||||
G.jokers.cart_zoom_slider = math.max(0, math.min(100, G.jokers.cart_zoom_slider + sign * shift / self_T_w))
|
||||
|
||||
local slider = G.jokers.children.cartomancer_controls:get_UIE_by_ID('joker_slider')
|
||||
-- Only relevant part, copied from G.FUNCS.slider
|
||||
local rt = slider.config.ref_table
|
||||
slider.T.w = (G.jokers.cart_zoom_slider - rt.min)/(rt.max - rt.min)*rt.w
|
||||
slider.config.w = slider.T.w
|
||||
else
|
||||
slide_speedup = nil
|
||||
end
|
||||
else
|
||||
card.T.r = 0.1*(-#self.cards/2 - 0.5 + k)/(#self.cards)+ (G.SETTINGS.reduced_motion and 0 or 1)*0.02*math.sin(2*G.TIMERS.REAL+card.T.x)
|
||||
local max_cards = math.max(#self.cards, self.config.temp_limit)
|
||||
card.T.x = self_T_x + (self_T_w-self.card_w)*((k-1)/math.max(max_cards-1, 1) - 0.5*(#self.cards-max_cards)/math.max(max_cards-1, 1)) + 0.5*(self.card_w - card.T.w)
|
||||
if #self.cards > 2 or (#self.cards > 1 and self == G.consumeables) or (#self.cards > 1 and self.config.spread) then
|
||||
card.T.x = self_T_x + (self_T_w-self.card_w)*((k-1)/(#self.cards-1)) + 0.5*(self.card_w - card.T.w)
|
||||
elseif #self.cards > 1 and self ~= G.consumeables then
|
||||
card.T.x = self_T_x + (self_T_w-self.card_w)*((k - 0.5)/(#self.cards)) + 0.5*(self.card_w - card.T.w)
|
||||
else
|
||||
card.T.x = self_T_x + self_T_w/2 - self.card_w/2 + 0.5*(self.card_w - card.T.w)
|
||||
end
|
||||
local highlight_height = G.HIGHLIGHT_H/2
|
||||
if not card.highlighted then highlight_height = 0 end
|
||||
card.T.y = self.T.y + self.T.h/2 - card.T.h/2 - highlight_height+ (G.SETTINGS.reduced_motion and 0 or 1)*0.03*math.sin(0.666*G.TIMERS.REAL+card.T.x)
|
||||
card.T.x = card.T.x + card.shadow_parrallax.x/30
|
||||
end
|
||||
end
|
||||
if not (old_slider_value == G.jokers.cart_zoom_slider) then
|
||||
old_slider_value = G.jokers.cart_zoom_slider
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--*--------------------------
|
||||
--*------HIDE JOKERS
|
||||
--*--------------------------
|
||||
-- TODO : popup below joker to hide it
|
||||
|
||||
local JOKER_RARITY = {
|
||||
'common',
|
||||
'uncommon',
|
||||
'rare',
|
||||
'legendary',
|
||||
}
|
||||
|
||||
function Cartomancer.add_visibility_controls()
|
||||
if not G.jokers then
|
||||
return
|
||||
end
|
||||
|
||||
|
||||
if not (Cartomancer.SETTINGS.jokers_controls_buttons and #G.jokers.cards >= Cartomancer.SETTINGS.jokers_controls_show_after) then
|
||||
G.jokers.cart_jokers_expanded = false
|
||||
if G.jokers.children.cartomancer_controls then
|
||||
Cartomancer.align_G_jokers()
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
if not G.jokers.children.cartomancer_controls then
|
||||
local settings = Sprite(0,0,0.425,0.425,G.ASSET_ATLAS["cart_settings"], {x=0, y=0})
|
||||
settings.states.drag.can = false
|
||||
|
||||
local joker_slider = nil
|
||||
if G.jokers.cart_jokers_expanded then
|
||||
joker_slider = create_slider({id = 'joker_slider', w = 6, h = 0.4,
|
||||
ref_table = G.jokers, ref_value = 'cart_zoom_slider', min = 0, max = 100,
|
||||
decimal_places = 1,
|
||||
hide_val = true,
|
||||
colour = G.C.CHIPS,
|
||||
})
|
||||
joker_slider.config.padding = 0
|
||||
end
|
||||
|
||||
G.jokers.children.cartomancer_controls = UIBox {
|
||||
definition = {
|
||||
n = G.UIT.ROOT,
|
||||
config = { align = 'cm', padding = 0.07, colour = G.C.CLEAR, },
|
||||
nodes = {
|
||||
{n=G.UIT.R, config={align = 'tm', padding = 0.07, no_fill = true}, nodes={
|
||||
|
||||
G.jokers.cart_hide_all and
|
||||
{n=G.UIT.C, config={align = "cm"}, nodes={
|
||||
UIBox_button({id = 'show_all_jokers', button = 'cartomancer_show_all_jokers', label = {localize('carto_jokers_show')},
|
||||
minh = 0.45, minw = 1, col = false, scale = 0.3,
|
||||
colour = G.C.CHIPS, --func = function ()return Cartomancer.SETTINGS.jokers_visibility_controls end
|
||||
})
|
||||
}}
|
||||
or
|
||||
{n=G.UIT.C, config={align = "cm", }, nodes={
|
||||
UIBox_button({id = 'hide_all_jokers', button = 'cartomancer_hide_all_jokers', label ={localize('carto_jokers_hide')},
|
||||
minh = 0.45, minw = 1, col = false, scale = 0.3,-- func = function ()return Cartomancer.SETTINGS.jokers_visibility_controls end
|
||||
})
|
||||
}},
|
||||
|
||||
{n=G.UIT.C, config={align = "cm"}, nodes={
|
||||
UIBox_button({id = 'zoom_jokers', button = 'cartomancer_zoom_jokers', label = {localize('carto_jokers_zoom')},
|
||||
minh = 0.45, minw = 1, col = false, scale = 0.3,
|
||||
})
|
||||
}},
|
||||
joker_slider,
|
||||
|
||||
Cartomancer.INTERNAL_jokers_menu and {n=G.UIT.C, config={align = "cm"}, nodes={
|
||||
{n=G.UIT.C, config={align = "cm", padding = 0.01, r = 0.1, hover = true, colour = G.C.BLUE, button = 'cartomancer_joker_visibility_settings', shadow = true}, nodes={
|
||||
{n=G.UIT.O, config={object = settings}},
|
||||
}},
|
||||
}} or nil,
|
||||
}}
|
||||
}
|
||||
},
|
||||
config = {
|
||||
align = 't',
|
||||
bond = 'Strong',
|
||||
parent = G.jokers
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
-- This makes sure UIBox is drawn every frame
|
||||
G.jokers.children.cartomancer_controls:draw()
|
||||
end
|
||||
|
||||
G.FUNCS.cartomancer_hide_all_jokers = function(e)
|
||||
Cartomancer.hide_all_jokers()
|
||||
G.jokers.cart_hide_all = true
|
||||
Cartomancer.align_G_jokers()
|
||||
end
|
||||
|
||||
G.FUNCS.cartomancer_show_all_jokers = function(e)
|
||||
Cartomancer.show_all_jokers()
|
||||
G.jokers.cart_hide_all = false
|
||||
Cartomancer.align_G_jokers()
|
||||
end
|
||||
|
||||
G.FUNCS.cartomancer_zoom_jokers = function(e)
|
||||
G.jokers.cart_jokers_expanded = not G.jokers.cart_jokers_expanded
|
||||
Cartomancer.align_G_jokers()
|
||||
end
|
||||
|
||||
|
||||
G.FUNCS.cartomancer_joker_visibility_settings = function(e)
|
||||
|
||||
G.CARTO_JOKER_VISIBILITY = UIBox{
|
||||
definition = Cartomancer.jokers_visibility_standalone_menu(),
|
||||
config = {align="cm", offset = {x=0,y=10},major = G.ROOM_ATTACH, bond = 'Weak', instance_type = "POPUP"}
|
||||
}
|
||||
G.CARTO_JOKER_VISIBILITY.alignment.offset.y = 0
|
||||
G.ROOM.jiggle = G.ROOM.jiggle + 1
|
||||
G.CARTO_JOKER_VISIBILITY:align_to_major()
|
||||
-- TODO : REMOVE WHEN APPLY/CANCEL IS PRESSED
|
||||
end
|
||||
|
||||
local function hide_card(card)
|
||||
card.states.visible = false
|
||||
end
|
||||
|
||||
function Cartomancer.handle_joker_added(card)
|
||||
|
||||
|
||||
if G.jokers.cart_hide_all then
|
||||
hide_card(card)
|
||||
end
|
||||
end
|
||||
|
||||
function Cartomancer.hide_hovered_joker(controller)
|
||||
if not G.jokers then
|
||||
return
|
||||
end
|
||||
|
||||
local selected = controller.focused.target or controller.hovering.target
|
||||
|
||||
if not selected or not selected:is(Card) then
|
||||
return
|
||||
end
|
||||
|
||||
if selected.area ~= G.jokers then
|
||||
return
|
||||
end
|
||||
|
||||
hide_card(selected)
|
||||
end
|
||||
|
||||
function Cartomancer.hide_all_jokers()
|
||||
if not G.jokers then
|
||||
print("no jokers")
|
||||
return
|
||||
end
|
||||
|
||||
local total_jokers = #G.jokers.cards
|
||||
|
||||
for i = 1, total_jokers do
|
||||
hide_card(G.jokers.cards[i])
|
||||
end
|
||||
end
|
||||
|
||||
function Cartomancer.show_all_jokers()
|
||||
if not G.jokers then
|
||||
Cartomancer.log("no jokers")
|
||||
return
|
||||
end
|
||||
|
||||
local total_jokers = #G.jokers.cards
|
||||
|
||||
for i = 1, total_jokers do
|
||||
G.jokers.cards[i].states.visible = true
|
||||
end
|
||||
|
||||
end
|
54
Cartomancer-v.4.10-fix-fix/core/optimizations.lua
Normal file
|
@ -0,0 +1,54 @@
|
|||
|
||||
-- ============================
|
||||
-- Hide non-essential shaders
|
||||
-- ============================
|
||||
local essential_shaders = {
|
||||
background = true,
|
||||
CRT = true,
|
||||
flame = true,
|
||||
flash = true,
|
||||
dissolve = true,
|
||||
vortex = true,
|
||||
voucher = true,
|
||||
booster = true,
|
||||
hologram = true,
|
||||
debuff = true,
|
||||
played = true,
|
||||
skew = true,
|
||||
splash = true,
|
||||
}
|
||||
|
||||
local sprite_draw_shader = Sprite.draw_shader
|
||||
function Sprite:draw_shader(_shader, _shadow_height, _send, _no_tilt, other_obj, ms, mr, mx, my, custom_shader, tilt_shadow)
|
||||
if not Cartomancer.SETTINGS.draw_non_essential_shaders and _shader == 'negative' then
|
||||
_shader = 'dissolve'
|
||||
_send = nil
|
||||
end
|
||||
|
||||
if Cartomancer.SETTINGS.draw_non_essential_shaders or essential_shaders[_shader] then
|
||||
return sprite_draw_shader(self, _shader, _shadow_height, _send, _no_tilt, other_obj, ms, mr, mx, my, custom_shader, tilt_shadow)
|
||||
end
|
||||
end
|
||||
|
||||
-- ============================
|
||||
-- Hide card areas
|
||||
-- ============================
|
||||
local cardarea_draw = CardArea.draw
|
||||
function CardArea:draw()
|
||||
if Cartomancer.SETTINGS.hide_consumables and self == G.consumeables then
|
||||
return
|
||||
elseif Cartomancer.SETTINGS.hide_deck and self == G.deck then
|
||||
return
|
||||
end
|
||||
|
||||
return cardarea_draw(self)
|
||||
end
|
||||
|
||||
-- ============================
|
||||
-- Hide tags
|
||||
-- ============================
|
||||
function Cartomancer.update_tags_visibility()
|
||||
for _, tag in pairs(G.GAME.tags) do
|
||||
tag.HUD_tag.states.visible = not Cartomancer.SETTINGS.hide_tags
|
||||
end
|
||||
end
|
143
Cartomancer-v.4.10-fix-fix/core/view-deck-steamodded.lua
Normal file
|
@ -0,0 +1,143 @@
|
|||
|
||||
local Cartomancer_replacements = {
|
||||
{
|
||||
find = [[
|
||||
for k, v in ipairs%(G%.playing_cards%) do
|
||||
if v%.base%.suit then table%.insert%(SUITS%[v%.base%.suit%], v%) end]],
|
||||
-- Steamodded<0917b
|
||||
find_alt = [[
|
||||
for k, v in ipairs%(G%.playing_cards%) do
|
||||
table%.insert%(SUITS%[v%.base%.suit%], v%)]],
|
||||
place = [[
|
||||
local SUITS_SORTED = Cartomancer.tablecopy(SUITS)
|
||||
for k, v in ipairs(G.playing_cards) do
|
||||
if v.base.suit then
|
||||
local greyed
|
||||
if unplayed_only and not ((v.area and v.area == G.deck) or v.ability.wheel_flipped) then
|
||||
greyed = true
|
||||
end
|
||||
local card_string = v:cart_to_string()
|
||||
if greyed then
|
||||
card_string = card_string .. "Greyed" -- for some reason format doesn't work and final string is `sGreyed`
|
||||
end
|
||||
if greyed and Cartomancer.SETTINGS.deck_view_hide_drawn_cards then
|
||||
-- Ignore this card.
|
||||
elseif not Cartomancer.SETTINGS.deck_view_stack_enabled then
|
||||
-- Don't stack cards
|
||||
local _scale = 0.7
|
||||
local copy = copy_card(v, nil, _scale)
|
||||
|
||||
copy.greyed = greyed
|
||||
copy.stacked_quantity = 1
|
||||
table.insert(SUITS_SORTED[v.base.suit], copy)
|
||||
|
||||
elseif not SUITS[v.base.suit][card_string] then
|
||||
-- Initiate stack
|
||||
table.insert(SUITS_SORTED[v.base.suit], card_string)
|
||||
|
||||
local _scale = 0.7
|
||||
local copy = copy_card(v, nil, _scale)
|
||||
|
||||
copy.greyed = greyed
|
||||
copy.stacked_quantity = 1
|
||||
|
||||
SUITS[v.base.suit][card_string] = copy
|
||||
else
|
||||
-- Stack cards
|
||||
local stacked_card = SUITS[v.base.suit][card_string]
|
||||
stacked_card.stacked_quantity = stacked_card.stacked_quantity + 1
|
||||
end
|
||||
end]]
|
||||
},
|
||||
|
||||
{
|
||||
find = "card_limit = #SUITS%[suit_map%[j%]%],",
|
||||
place = "card_limit = #SUITS_SORTED[suit_map[j]],"
|
||||
},
|
||||
|
||||
{
|
||||
find = [[
|
||||
for i = 1%, %#SUITS%[suit_map%[j%]%] do
|
||||
if SUITS%[suit_map%[j%]%]%[i%] then
|
||||
local greyed%, _scale = nil%, 0%.7
|
||||
if unplayed_only and not %(%(SUITS%[suit_map%[j%]%]%[i%]%.area and SUITS%[suit_map%[j%]%]%[i%]%.area == G%.deck%) or SUITS%[suit_map%[j%]%]%[i%]%.ability%.wheel_flipped%) then
|
||||
greyed = true
|
||||
end
|
||||
local copy = copy_card%(SUITS%[suit_map%[j%]%]%[i%]%, nil%, _scale%)
|
||||
copy%.greyed = greyed
|
||||
copy%.T%.x = view_deck%.T%.x %+ view_deck%.T%.w %/ 2
|
||||
copy%.T%.y = view_deck%.T%.y
|
||||
|
||||
copy:hard_set_T%(%)
|
||||
view_deck:emplace%(copy%)
|
||||
end
|
||||
end]],
|
||||
place = [[
|
||||
for i = 1%, %#SUITS_SORTED%[suit_map%[j%]%] do
|
||||
local card
|
||||
if not Cartomancer.SETTINGS.deck_view_stack_enabled then
|
||||
card = SUITS_SORTED%[suit_map%[j%]%]%[i%]
|
||||
else
|
||||
local card_string = SUITS_SORTED%[suit_map%[j%]%]%[i%]
|
||||
card = SUITS%[suit_map%[j%]%]%[card_string%]
|
||||
end
|
||||
|
||||
card%.T%.x = view_deck%.T%.x %+ view_deck%.T%.w%/2
|
||||
card%.T%.y = view_deck%.T%.y
|
||||
card:create_quantity_display%(%)
|
||||
|
||||
card:hard_set_T%(%)
|
||||
view_deck:emplace%(card%)
|
||||
end]]
|
||||
},
|
||||
|
||||
{
|
||||
find = ' modded and {n = G.UIT.R, config = {align = "cm"}, nodes = {',
|
||||
place = [=[
|
||||
not unplayed_only and Cartomancer.add_unique_count() or nil,
|
||||
modded and {n = G.UIT.R, config = {align = "cm"}, nodes = {]=]
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
|
||||
-- Mom, can we have lovely patches for overrides.lua?
|
||||
-- No, we have lovely patches at home
|
||||
|
||||
-- Lovely patches at home:
|
||||
|
||||
local Cartomancer_nfs_read
|
||||
local Cartomancer_nfs_read_override = function (containerOrName, nameOrSize, sizeOrNil)
|
||||
local data, size = Cartomancer_nfs_read(containerOrName, nameOrSize, sizeOrNil)
|
||||
|
||||
if type(containerOrName) ~= "string" then
|
||||
return data, size
|
||||
end
|
||||
local overrides = '/overrides.lua'
|
||||
if containerOrName:sub(-#overrides) ~= overrides then
|
||||
return data, size
|
||||
end
|
||||
|
||||
local replaced = 0
|
||||
local total_replaced = 0
|
||||
for _, v in ipairs(Cartomancer_replacements) do
|
||||
data, replaced = string.gsub(data, v.find, v.place)
|
||||
|
||||
if replaced == 0 and v.find_alt then
|
||||
data, replaced = string.gsub(data, v.find_alt, v.place)
|
||||
end
|
||||
|
||||
if replaced == 0 then
|
||||
print("Failed to replace " .. v.find .. " for overrides.lua")
|
||||
else
|
||||
total_replaced = total_replaced + 1
|
||||
end
|
||||
end
|
||||
|
||||
print("Totally applied " .. total_replaced .. " replacements to overrides.lua")
|
||||
|
||||
-- We no longer need this override
|
||||
NFS.read = Cartomancer_nfs_read
|
||||
|
||||
return data, size
|
||||
end
|
147
Cartomancer-v.4.10-fix-fix/core/view-deck.lua
Normal file
|
@ -0,0 +1,147 @@
|
|||
|
||||
function Card:cart_to_string(args)
|
||||
local args = args or {}
|
||||
|
||||
local suit = self.base and (
|
||||
-- if has base, check for stone / no_suit
|
||||
-- only use NoSuit for unique_count, deck view displays every stone card in respective suit area
|
||||
(self.ability.effect == 'Stone Card' or self.config.center.no_suit) and args.unique_count and 'NoSuit' or self.base.suit
|
||||
-- otherwise empty string
|
||||
) or ''
|
||||
|
||||
local rank = self.base and (
|
||||
-- if has base, check for stone / no_rank
|
||||
(self.ability.effect == 'Stone Card' or self.config.center.no_rank) and 'NoRank' or self.base.value
|
||||
-- otherwise empty string
|
||||
) or ''
|
||||
|
||||
if not Cartomancer.SETTINGS.deck_view_stack_chips then
|
||||
rank = rank .. tostring(self:get_chip_bonus())
|
||||
end
|
||||
|
||||
if not args.unique_count and Cartomancer.SETTINGS.deck_view_stack_modifiers then
|
||||
return string.format(
|
||||
"%s%s",
|
||||
suit,
|
||||
rank,
|
||||
self.greyed and 'Greyed' or ''
|
||||
)
|
||||
end
|
||||
|
||||
return string.format(
|
||||
"%s%s%s%s%s%s%s%s%s%s",
|
||||
suit,
|
||||
rank,
|
||||
self.ability and self.ability.name or '',
|
||||
self.edition and (self.edition.type or next(self.edition)) or '',
|
||||
self.seal or '',
|
||||
-- TODO : steamodded stickers compatibility
|
||||
self.eternal and 'Eternal' or '',
|
||||
self.perishable and 'Perishable' or '',
|
||||
self.rental and 'Rental' or '',
|
||||
self.debuff and 'Debuff' or '',
|
||||
|
||||
self.greyed and 'Greyed' or ''
|
||||
)
|
||||
end
|
||||
|
||||
-- Util
|
||||
function Cartomancer.tablecopy(t)
|
||||
local t2 = {}
|
||||
for k,v in pairs(t) do
|
||||
t2[k] = v
|
||||
end
|
||||
return t2
|
||||
end
|
||||
|
||||
function Cartomancer.table_size(t)
|
||||
local size = 0
|
||||
for _, _ in pairs(t) do
|
||||
size = size + 1
|
||||
end
|
||||
|
||||
return size
|
||||
end
|
||||
|
||||
function Cartomancer.add_unique_count()
|
||||
local unique_count = 0
|
||||
|
||||
local all_keys = {}
|
||||
|
||||
for i = 1, #G.playing_cards do
|
||||
local key = G.playing_cards[i]:cart_to_string{ unique_count=true }
|
||||
if not all_keys[key] then
|
||||
all_keys[key] = true
|
||||
unique_count = unique_count + 1
|
||||
end
|
||||
end
|
||||
|
||||
-- for _, cards in pairs(SUITS_SORTED) do
|
||||
-- unique_count = unique_count + #cards
|
||||
-- end
|
||||
|
||||
return {n=G.UIT.R, config={align = "cm"}, nodes={
|
||||
{n=G.UIT.T, config={text = localize('carto_deck_view_unique_cards')..' '..tostring(unique_count), colour = G.C.WHITE, scale = 0.3}},
|
||||
}}
|
||||
end
|
||||
|
||||
-- Handle amount display
|
||||
|
||||
----- Copied from incantation
|
||||
G.FUNCS.disable_quantity_display = function(e)
|
||||
local preview_card = e.config.ref_table
|
||||
e.states.visible = preview_card.stacked_quantity > 1
|
||||
end
|
||||
|
||||
|
||||
function Card:create_quantity_display()
|
||||
if not Cartomancer.SETTINGS.deck_view_stack_enabled then
|
||||
return
|
||||
end
|
||||
|
||||
local X_COLOR = HEX(Cartomancer.SETTINGS.deck_view_stack_x_color)
|
||||
|
||||
if not self.children.stack_display and self.stacked_quantity > 1 then
|
||||
self.children.stack_display = UIBox {
|
||||
definition = {
|
||||
n = G.UIT.ROOT,
|
||||
config = {
|
||||
minh = 0.5,
|
||||
maxh = 1.2,
|
||||
minw = 0.43,
|
||||
maxw = 2,
|
||||
r = 0.001,
|
||||
padding = 0.1,
|
||||
align = 'cm',
|
||||
colour = adjust_alpha(darken(G.C.BLACK, 0.2), Cartomancer.SETTINGS.deck_view_stack_background_opacity / 100),
|
||||
shadow = false,
|
||||
func = 'disable_quantity_display',
|
||||
ref_table = self
|
||||
},
|
||||
nodes = {
|
||||
{
|
||||
n = G.UIT.T, -- node type
|
||||
config = { text = 'x', scale = 0.35, colour = X_COLOR }
|
||||
, padding = -1
|
||||
},
|
||||
{
|
||||
n = G.UIT.T, -- node type
|
||||
config = {
|
||||
ref_table = self, ref_value = 'stacked_quantity',
|
||||
scale = 0.35, colour = G.C.UI.TEXT_LIGHT
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
config = {
|
||||
align = (Cartomancer.SETTINGS.deck_view_stack_pos_vertical:sub(1, 1)) .. (Cartomancer.SETTINGS.deck_view_stack_pos_horizontal:sub(1, 1)),
|
||||
bond = 'Strong',
|
||||
parent = self
|
||||
},
|
||||
states = {
|
||||
collide = { can = false },
|
||||
drag = { can = true }
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
25
Cartomancer-v.4.10-fix-fix/internal/atlas.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
local function asset_path(filename)
|
||||
return Cartomancer.path.."/assets/"..G.SETTINGS.GRAPHICS.texture_scaling.."x/"..filename
|
||||
end
|
||||
|
||||
local assets = {
|
||||
{name = 'cart_modicon', path = asset_path('modicon.png'), px = 32, py = 32},
|
||||
{name = 'cart_settings', path = asset_path('settings.png'), px = 80, py = 80},
|
||||
}
|
||||
|
||||
local game_set_render_settings = Game.set_render_settings
|
||||
|
||||
function Game:set_render_settings()
|
||||
game_set_render_settings(self)
|
||||
|
||||
for i=1, #assets do
|
||||
G.ASSET_ATLAS[assets[i].name] = {}
|
||||
G.ASSET_ATLAS[assets[i].name].name = assets[i].name
|
||||
-- File load method using steamodded's code
|
||||
local file_data = assert(Cartomancer.nfs.newFileData(assets[i].path), 'Failed to collect file data for '..assets[i].name)
|
||||
local image_data = assert(love.image.newImageData(file_data), 'Failed to initialize image data for '..assets[i].name)
|
||||
G.ASSET_ATLAS[assets[i].name].image = love.graphics.newImage(image_data, {mipmaps = true, dpiscale = G.SETTINGS.GRAPHICS.texture_scaling})
|
||||
G.ASSET_ATLAS[assets[i].name].px = assets[i].px
|
||||
G.ASSET_ATLAS[assets[i].name].py = assets[i].py
|
||||
end
|
||||
end
|
78
Cartomancer-v.4.10-fix-fix/internal/config.lua
Normal file
|
@ -0,0 +1,78 @@
|
|||
|
||||
Cartomancer.save_config = function ()
|
||||
Cartomancer.log "Saving cartomancer config..."
|
||||
love.filesystem.write('config/cartomancer.jkr', "return " .. Cartomancer.dump(Cartomancer.SETTINGS))
|
||||
end
|
||||
|
||||
-- Logic for keeping config tables up to date
|
||||
local function remove_unused_keys(from_table, template)
|
||||
for k, v in pairs(from_table) do
|
||||
if template[k] == nil then
|
||||
Cartomancer.log("Removing setting `"..k.. "` because it is not in default config")
|
||||
from_table[k] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function add_missing_keys(to_table, template)
|
||||
for k, v in pairs(template) do
|
||||
if to_table[k] == nil then
|
||||
Cartomancer.log("Adding setting `"..k.. "` because it is missing in latest config")
|
||||
to_table[k] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Cartomancer.load_config = function ()
|
||||
Cartomancer.log "Starting to load config"
|
||||
if not love.filesystem.getInfo('config') then
|
||||
Cartomancer.log("Creating config folder...")
|
||||
love.filesystem.createDirectory('config')
|
||||
end
|
||||
|
||||
-- Steamodded config file location
|
||||
local config_file = love.filesystem.read('config/cartomancer.jkr')
|
||||
local latest_default_config = Cartomancer.load_mod_file('config.lua', 'default-config')
|
||||
|
||||
if config_file then
|
||||
Cartomancer.log "Reading config file: "
|
||||
Cartomancer.log(config_file)
|
||||
Cartomancer.SETTINGS = STR_UNPACK(config_file) -- Use STR_UNPACK to avoid code injectons via config files
|
||||
else
|
||||
Cartomancer.log "Creating default settings"
|
||||
Cartomancer.SETTINGS = latest_default_config
|
||||
Cartomancer.save_config()
|
||||
end
|
||||
|
||||
remove_unused_keys(Cartomancer.SETTINGS, latest_default_config)
|
||||
add_missing_keys(Cartomancer.SETTINGS, latest_default_config)
|
||||
|
||||
remove_unused_keys(Cartomancer.SETTINGS.keybinds, latest_default_config.keybinds)
|
||||
add_missing_keys(Cartomancer.SETTINGS.keybinds, latest_default_config.keybinds)
|
||||
|
||||
Cartomancer.log "Successfully loaded config: "
|
||||
Cartomancer.log(Cartomancer.SETTINGS)
|
||||
end
|
||||
|
||||
local cart_options_ref = G.FUNCS.options
|
||||
G.FUNCS.options = function(e)
|
||||
if Cartomancer.INTERNAL_in_config then
|
||||
Cartomancer.INTERNAL_in_config = false
|
||||
if Cartomancer._recording_keybind then
|
||||
Cartomancer.log "Quit config, stopping to record keybind"
|
||||
Cartomancer._recording_keybind = nil
|
||||
end
|
||||
Cartomancer.save_config()
|
||||
end
|
||||
return cart_options_ref(e)
|
||||
end
|
||||
|
||||
local settings_tab_ref = G.UIDEF.settings_tab
|
||||
function G.UIDEF.settings_tab(tab)
|
||||
if Cartomancer._recording_keybind then
|
||||
Cartomancer.log "Changed settings tab, stopping to record keybind"
|
||||
Cartomancer._recording_keybind = nil
|
||||
end
|
||||
-- Maybe I should port cartomancer settings to use this function as well? but it would still not work with other mods that add custom tabs :sob:
|
||||
return settings_tab_ref(tab)
|
||||
end
|
99
Cartomancer-v.4.10-fix-fix/internal/init.lua
Normal file
|
@ -0,0 +1,99 @@
|
|||
Cartomancer = {}
|
||||
|
||||
Cartomancer.SETTINGS = {}
|
||||
|
||||
Cartomancer.nfs = require "cartomancer.nfs"
|
||||
local lovely = require "lovely"
|
||||
|
||||
Cartomancer.INTERNAL_debugging = not not love.filesystem.getInfo('cartomancer_debugging')
|
||||
|
||||
Cartomancer.use_smods = function ()
|
||||
return SMODS and not (MODDED_VERSION == "0.9.8-STEAMODDED")
|
||||
end
|
||||
|
||||
|
||||
Cartomancer.find_self = function (target_filename)
|
||||
local mods_path = lovely.mod_dir
|
||||
|
||||
local mod_folders = Cartomancer.nfs.getDirectoryItems(mods_path)
|
||||
for _, folder in pairs(mod_folders) do
|
||||
local path = string.format('%s/%s', mods_path, folder)
|
||||
local files = Cartomancer.nfs.getDirectoryItems(path)
|
||||
|
||||
for _, filename in pairs(files) do
|
||||
if filename == target_filename then
|
||||
return path
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Cartomancer.load_mod_file = function (path, name, as_txt)
|
||||
name = name or path
|
||||
|
||||
local file, err = Cartomancer.nfs.read(Cartomancer.path..'/'..path)
|
||||
|
||||
assert(file, string.format([=[[Cartomancer] Failed to load mod file %s (%s).:
|
||||
%s
|
||||
|
||||
Get latest release here: https://github.com/stupxd/Cartomancer/releases ]=], path, name, tostring(err)))
|
||||
|
||||
return as_txt and file or load(file, string.format(" Cartomancer - %s ", name))()
|
||||
end
|
||||
|
||||
Cartomancer.log = function (msg)
|
||||
if Cartomancer.INTERNAL_debugging then
|
||||
local msg = type(msg) == "string" and msg or Cartomancer.dump(msg)
|
||||
|
||||
print("[Cartomancer] "..msg)
|
||||
end
|
||||
end
|
||||
|
||||
Cartomancer.dump = function (o, level, prefix)
|
||||
level = level or 1
|
||||
prefix = prefix or ' '
|
||||
if type(o) == 'table' and level <= 5 then
|
||||
local s = '{ \n'
|
||||
for k, v in pairs(o) do
|
||||
local format
|
||||
if type(k) == 'number' then
|
||||
format = '%s[%d] = %s,\n'
|
||||
else
|
||||
format = '%s["%s"] = %s,\n'
|
||||
end
|
||||
s = s .. string.format(
|
||||
format,
|
||||
prefix,
|
||||
k,
|
||||
-- Compact parent & draw_major to avoid recursion and huge dumps.
|
||||
(k == 'parent' or k == 'draw_major') and string.format("'%s'", tostring(v)) or Cartomancer.dump(v, level + 1, prefix..' ')
|
||||
)
|
||||
end
|
||||
return s..prefix:sub(3)..'}'
|
||||
else
|
||||
if type(o) == "string" then
|
||||
return string.format('"%s"', o)
|
||||
end
|
||||
|
||||
if type(o) == "function" or type(o) == "table" then
|
||||
return string.format("'%s'", tostring(o))
|
||||
end
|
||||
|
||||
return tostring(o)
|
||||
end
|
||||
end
|
||||
|
||||
Cartomancer.table_join_keys = function (tab_, separator)
|
||||
local separator = separator or ""
|
||||
local inline
|
||||
for k, _ in pairs(tab_) do
|
||||
inline = (inline and inline..separator or "") .. k
|
||||
end
|
||||
|
||||
return inline or "[empty]"
|
||||
end
|
||||
|
||||
Cartomancer.do_nothing = function (...) end
|
||||
|
||||
|
||||
return Cartomancer
|
128
Cartomancer-v.4.10-fix-fix/internal/keybinds.lua
Normal file
|
@ -0,0 +1,128 @@
|
|||
Cartomancer.INTERNAL_keybinds = {}
|
||||
|
||||
-- Lock for activated keybinds to not trigger multiple times
|
||||
local activated = {}
|
||||
|
||||
-- Check if a specific keybind can
|
||||
local function is_keybind_pressed(controller, name)
|
||||
local required_keys = Cartomancer.SETTINGS.keybinds[name]
|
||||
|
||||
for key, _ in pairs(required_keys) do
|
||||
if not controller.held_keys[key] then
|
||||
return false
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
-- On key press, check keybinds that can activate
|
||||
local function check_keybinds_activation(controller)
|
||||
for name, func in pairs(Cartomancer.INTERNAL_keybinds) do
|
||||
if not activated[name] and is_keybind_pressed(controller, name) then
|
||||
func(controller)
|
||||
activated[name] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- On key unpress, check active keybinds and remove the ones that should deactivate
|
||||
local function check_keybinds_deactivation(controller)
|
||||
local to_remove = {}
|
||||
for name, _ in pairs(activated) do
|
||||
if not is_keybind_pressed(controller, name) then
|
||||
table.insert(to_remove, name)
|
||||
end
|
||||
end
|
||||
|
||||
for _, name in pairs(to_remove) do
|
||||
activated[name] = nil
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
-- Public functions to handle keybinds
|
||||
--
|
||||
|
||||
function Cartomancer.register_keybind(args)
|
||||
assert(type(args.name) == "string", 'keybind args `name` is missing or not a string')
|
||||
assert(type(args.func) == "function", 'keybind args `func` is missing or not a function')
|
||||
|
||||
assert(Cartomancer.SETTINGS.keybinds[args.name], 'invalid keybind name: '..args.name)
|
||||
|
||||
Cartomancer.INTERNAL_keybinds[args.name] = args.func
|
||||
end
|
||||
|
||||
function Cartomancer.record_keybind(args)
|
||||
Cartomancer.log "Starting to record keybind"
|
||||
if Cartomancer._recording_keybind then
|
||||
Cartomancer.log "Already recording keybind, resetting that one!"
|
||||
local existing_keybind = Cartomancer.SETTINGS.keybinds[Cartomancer._recording_keybind.name]
|
||||
Cartomancer._recording_keybind.callback(existing_keybind)
|
||||
Cartomancer._recording_keybind = nil
|
||||
--return
|
||||
end
|
||||
assert(type(args.name) == "string", "missing keybind name")
|
||||
|
||||
if not args.callback then
|
||||
args.callback = function (new_keys)
|
||||
Cartomancer.SETTINGS.keybinds[args.name] = new_keys
|
||||
end
|
||||
end
|
||||
assert(type(args.callback) == "function", 'arg `callback` must be a function')
|
||||
-- optional arg display pressed keys live
|
||||
args.press_callback = args.press_callback or Cartomancer.do_nothing
|
||||
assert(type(args.press_callback) == "function", 'arg `press_callback` must be a function')
|
||||
Cartomancer._recording_keybind = {
|
||||
name = args.name,
|
||||
pressed = {},
|
||||
callback = args.callback,
|
||||
press_callback = args.press_callback
|
||||
}
|
||||
end
|
||||
|
||||
--
|
||||
-- Handle key press / release
|
||||
--
|
||||
|
||||
local on_press = Controller.key_press
|
||||
function Controller:key_press(key)
|
||||
if key == 'escape' and Cartomancer._recording_keybind then
|
||||
-- Reset keybind completely
|
||||
Cartomancer.log "Resetting keybind"
|
||||
local empty_keybind = {['[none]'] = true}
|
||||
Cartomancer._recording_keybind.callback(empty_keybind)
|
||||
Cartomancer._recording_keybind = nil
|
||||
return
|
||||
end
|
||||
|
||||
local ret = on_press(self, key)
|
||||
|
||||
if Cartomancer._recording_keybind then
|
||||
Cartomancer.log("Adding key "..key)
|
||||
Cartomancer._recording_keybind.pressed[key] = true
|
||||
Cartomancer._recording_keybind.press_callback(Cartomancer._recording_keybind.pressed)
|
||||
else
|
||||
-- Only check activation if not recording
|
||||
check_keybinds_activation(self)
|
||||
end
|
||||
|
||||
return ret
|
||||
end
|
||||
|
||||
local on_release = Controller.key_release
|
||||
function Controller:key_release(key)
|
||||
local ret = on_release(self, key)
|
||||
|
||||
-- Only callback if key was pressed during keybind recording
|
||||
if Cartomancer._recording_keybind and Cartomancer._recording_keybind.pressed[key] then
|
||||
Cartomancer.log "Saving keybind"
|
||||
Cartomancer._recording_keybind.callback(Cartomancer._recording_keybind.pressed)
|
||||
Cartomancer._recording_keybind = nil
|
||||
end
|
||||
-- Keybinds should still deactivate even during recording
|
||||
check_keybinds_deactivation(self)
|
||||
|
||||
return ret
|
||||
end
|
||||
|
||||
|
18
Cartomancer-v.4.10-fix-fix/internal/localization.lua
Normal file
|
@ -0,0 +1,18 @@
|
|||
if Cartomancer.use_smods() then return end
|
||||
|
||||
-- Vanilla will only support default loc cuz yes.
|
||||
local loc_table = Cartomancer.load_mod_file('localization/en-us.lua', 'localization')
|
||||
|
||||
-- Credits: Steamodded
|
||||
-- I was lazy and it's not like I'm going to code anything different from this anyways~
|
||||
local function recurse(target, ref_table)
|
||||
if type(target) ~= 'table' then return end --this shouldn't happen unless there's a bad return value
|
||||
for k, v in pairs(target) do
|
||||
if not ref_table[k] or (type(v) ~= 'table') then
|
||||
ref_table[k] = v
|
||||
else
|
||||
recurse(v, ref_table[k])
|
||||
end
|
||||
end
|
||||
end
|
||||
recurse(loc_table, G.localization)
|
507
Cartomancer-v.4.10-fix-fix/internal/ui.lua
Normal file
|
@ -0,0 +1,507 @@
|
|||
|
||||
-- Setting max intensity to this value disables limit.
|
||||
Cartomancer._INTERNAL_max_flames_intensity = 40
|
||||
|
||||
local create_column_tabs,
|
||||
create_inline_slider,
|
||||
create_toggle_option,
|
||||
create_keybind,
|
||||
create_text_line,
|
||||
create_input_option,
|
||||
create_inline_options,
|
||||
create_option_cycle_custom
|
||||
|
||||
local create_UIBox_generic_options_custom = function (args)
|
||||
args = args or {}
|
||||
|
||||
return {n=G.UIT.ROOT, config = {align = "cl", minw = G.ROOM.T.w*0.6, padding = 0.0, r = 0.1,
|
||||
colour = args.bg_colour or {G.C.GREY[1], G.C.GREY[2], G.C.GREY[3],0.7}},
|
||||
nodes = {
|
||||
{n=G.UIT.C, config={align = "cl", padding = 0, minw = args.minw or 5, minh = args.minh or 3},
|
||||
nodes = args.contents
|
||||
},
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
local function is_chosen(tab)
|
||||
return Cartomancer.LAST_OPEN_TAB == tab
|
||||
end
|
||||
|
||||
local function choose_tab(tab)
|
||||
Cartomancer.LAST_OPEN_TAB = tab
|
||||
if Cartomancer._recording_keybind and not (tab == "keybinds") then
|
||||
Cartomancer.log "Switched settings tab, stopping recording keybind"
|
||||
Cartomancer._recording_keybind = nil
|
||||
end
|
||||
end
|
||||
|
||||
local tab_config = {r = 0.1, align = "t", padding = 0.0, colour = G.C.CLEAR, minw = 8.5, minh = 6}
|
||||
|
||||
Cartomancer.config_tab = function()
|
||||
Cartomancer.INTERNAL_in_config = true
|
||||
Cartomancer.log "Opened cartomancer config"
|
||||
local vertical_tabs = {}
|
||||
|
||||
choose_tab "compact_deck"
|
||||
|
||||
|
||||
table.insert(vertical_tabs, {
|
||||
label = localize('carto_settings_compact_deck'),
|
||||
chosen = is_chosen("compact_deck"),
|
||||
tab_definition_function = function (...)
|
||||
choose_tab "compact_deck"
|
||||
-- Yellow node. Align changes the position of modes inside
|
||||
return {n = G.UIT.ROOT, config = tab_config, nodes = {
|
||||
create_toggle_option {
|
||||
ref_value = 'compact_deck_enabled',
|
||||
localization = 'carto_compact_deck_enabled',
|
||||
},
|
||||
create_inline_slider({ref_value = 'compact_deck_visible_cards', localization = 'carto_compact_deck_visible_cards', max_value = 300}),
|
||||
}}
|
||||
end
|
||||
})
|
||||
|
||||
table.insert(vertical_tabs, {
|
||||
label = localize('carto_settings_deck_view'),
|
||||
chosen = is_chosen("deck_view"),
|
||||
tab_definition_function = function (...)
|
||||
choose_tab "deck_view"
|
||||
return {n = G.UIT.ROOT, config = tab_config, nodes = {
|
||||
create_toggle_option {
|
||||
ref_value = 'deck_view_hide_drawn_cards',
|
||||
localization = 'carto_deck_view_hide_drawn_cards',
|
||||
},
|
||||
create_toggle_option {
|
||||
ref_value = 'deck_view_stack_enabled',
|
||||
localization = 'carto_deck_view_stack_enabled',
|
||||
},
|
||||
create_toggle_option {
|
||||
ref_value = 'deck_view_stack_modifiers',
|
||||
localization = 'carto_deck_view_stack_modifiers',
|
||||
},
|
||||
create_toggle_option {
|
||||
ref_value = 'deck_view_stack_chips',
|
||||
localization = 'carto_deck_view_stack_chips',
|
||||
},
|
||||
--create_toggle_option('deck_view_stack_suits', 'carto_deck_view_stack_suits'),
|
||||
create_inline_slider({ref_value = 'deck_view_stack_background_opacity', localization = 'carto_deck_view_stack_background_opacity',}),
|
||||
create_input_option('deck_view_stack_x_color', 'carto_deck_view_stack_x_color', 6),
|
||||
|
||||
-- inline this
|
||||
{n = G.UIT.R, config = {align = "cl", padding = 0.05}, nodes = {
|
||||
{n = G.UIT.C, config = {align = "l", padding = 0}, nodes = {
|
||||
create_option_cycle_custom('deck_view_stack_pos_vertical', 'carto_deck_view_stack_pos_vertical',
|
||||
'cartomancer_deck_view_pos_vertical', 'carto_deck_view_stack_pos_vertical_options'),
|
||||
}},
|
||||
{n = G.UIT.C, config = {align = "r", padding = 0}, nodes = {
|
||||
create_option_cycle_custom('deck_view_stack_pos_horizontal', 'carto_deck_view_stack_pos_horizontal',
|
||||
'cartomancer_deck_view_pos_horizontal', 'carto_deck_view_stack_pos_horizontal_options'),
|
||||
}},
|
||||
}}
|
||||
}}
|
||||
end
|
||||
})
|
||||
|
||||
table.insert(vertical_tabs, {
|
||||
label = localize('carto_settings_jokers'),
|
||||
chosen = is_chosen("jokers"),
|
||||
tab_definition_function = Cartomancer.jokers_visibility_menu
|
||||
})
|
||||
|
||||
table.insert(vertical_tabs, {
|
||||
label = localize('carto_settings_flames'),
|
||||
chosen = is_chosen("flames"),
|
||||
tab_definition_function = function (...)
|
||||
choose_tab "flames"
|
||||
return {n = G.UIT.ROOT, config = tab_config, nodes = {
|
||||
create_inline_slider({ref_value = 'flames_intensity_min', localization = 'carto_flames_intensity_min', max_value = Cartomancer._INTERNAL_max_flames_intensity, decimal_places = 1}),
|
||||
create_inline_slider({ref_value = 'flames_intensity_max', localization = 'carto_flames_intensity_max', max_value = Cartomancer._INTERNAL_max_flames_intensity, decimal_places = 1}),
|
||||
create_toggle_option {
|
||||
ref_value = 'flames_relative_intensity',
|
||||
localization = 'carto_flames_relative_intensity',
|
||||
},
|
||||
create_toggle_option {
|
||||
ref_value = 'flames_slower_speed',
|
||||
localization = 'carto_flames_slower_speed',
|
||||
},
|
||||
create_inline_slider({ref_value = 'flames_volume', localization = 'carto_flames_volume',}),
|
||||
--
|
||||
}}
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
table.insert(vertical_tabs, {
|
||||
label = localize('carto_settings_other'),
|
||||
chosen = is_chosen("other"),
|
||||
tab_definition_function = function (...)
|
||||
choose_tab "other"
|
||||
return {n = G.UIT.ROOT, config = tab_config, nodes = {
|
||||
create_toggle_option {
|
||||
ref_value = 'improved_hand_sorting',
|
||||
localization = 'carto_improved_hand_sorting',
|
||||
callback = function () G.FUNCS.change_play_discard_position {to_key = G.SETTINGS.play_button_pos} end
|
||||
},
|
||||
create_toggle_option {
|
||||
ref_value = 'draw_non_essential_shaders',
|
||||
localization = 'carto_draw_non_essential_shaders',
|
||||
},
|
||||
create_toggle_option {
|
||||
ref_value = 'hide_tags',
|
||||
localization = 'carto_hide_tags',
|
||||
callback = function () Cartomancer.update_tags_visibility() end
|
||||
},
|
||||
create_toggle_option {
|
||||
ref_value = 'hide_consumables',
|
||||
localization = 'carto_hide_consumables',
|
||||
},
|
||||
create_toggle_option {
|
||||
ref_value = 'hide_deck',
|
||||
localization = 'carto_hide_deck',
|
||||
},
|
||||
create_toggle_option {
|
||||
ref_value = 'hide_jokers',
|
||||
localization = 'carto_hide_jokers',
|
||||
},
|
||||
}}
|
||||
end
|
||||
})
|
||||
|
||||
table.insert(vertical_tabs, {
|
||||
label = localize('carto_settings_keybinds'),
|
||||
chosen = is_chosen("keybinds"),
|
||||
tab_definition_function = function (...)
|
||||
choose_tab "keybinds"
|
||||
return {n = G.UIT.ROOT, config = tab_config, nodes = {
|
||||
create_keybind {
|
||||
name = 'hide_joker',
|
||||
localization = 'carto_kb_hide_joker',
|
||||
},
|
||||
create_keybind {
|
||||
name = 'toggle_tags',
|
||||
localization = 'carto_kb_toggle_tags',
|
||||
},
|
||||
create_keybind {
|
||||
name = 'toggle_consumables',
|
||||
localization = 'carto_kb_toggle_consumables',
|
||||
},
|
||||
create_keybind {
|
||||
name = 'toggle_jokers',
|
||||
localization = 'carto_kb_toggle_jokers',
|
||||
},
|
||||
create_keybind {
|
||||
name = 'toggle_jokers_buttons',
|
||||
localization = 'carto_kb_toggle_jokers_buttons',
|
||||
},
|
||||
}}
|
||||
end
|
||||
})
|
||||
|
||||
return create_UIBox_generic_options_custom({
|
||||
bg_colour = G.C.CLEAR,-- G.C.BLUE,
|
||||
contents = {
|
||||
{
|
||||
n = G.UIT.R,
|
||||
config = { padding = 0, align = "tl", minw = 9, colour = G.C.CLEAR },
|
||||
nodes = {
|
||||
create_column_tabs({
|
||||
tab_alignment = 'tl',
|
||||
tab_w = 8,
|
||||
tab_h = 4.3,-- this seems to not do shit?
|
||||
text_scale = 0.4,
|
||||
snap_to_nav = true,
|
||||
colour = G.C.CLEAR,-- G.C.RED,
|
||||
tabs = vertical_tabs
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
Cartomancer.jokers_visibility_standalone_menu = function ()
|
||||
return {n = G.UIT.C, config = {r = 0.1, align = "cm", padding = 0.0, colour = G.C.BLUE, minw = 8.5, minh = 6}, nodes = {
|
||||
Cartomancer.jokers_visibility_menu(),
|
||||
|
||||
}}
|
||||
end
|
||||
|
||||
Cartomancer.jokers_visibility_menu = function ()
|
||||
|
||||
choose_tab "jokers"
|
||||
|
||||
return {n = G.UIT.ROOT, config = tab_config, nodes = {
|
||||
create_toggle_option {
|
||||
ref_value = 'jokers_controls_buttons',
|
||||
localization = 'carto_jokers_controls_buttons',
|
||||
},
|
||||
create_inline_slider({ref_value = 'jokers_controls_show_after', localization = 'carto_jokers_controls_show_after',}),
|
||||
--create_text_line{ loc = 'carto_jokers_hide_keybind' },
|
||||
}}
|
||||
end
|
||||
|
||||
|
||||
create_inline_slider = function (args)
|
||||
local args = args or {}
|
||||
|
||||
local slider = create_slider({label = localize(args.localization), label_scale = 0.36, w = 3, h = 0.3, padding = -0.05,
|
||||
ref_table = Cartomancer.SETTINGS, ref_value = args.ref_value, min = args.min_value or 0, max = args.max_value or 100,
|
||||
decimal_places = args.decimal_places})
|
||||
|
||||
slider.nodes[1].config.align = "cl"
|
||||
|
||||
for _, node in pairs(slider.nodes) do
|
||||
node.n = G.UIT.C
|
||||
end
|
||||
-- slider.nodes[2].nodes[1].n = G.UIT.R
|
||||
return slider
|
||||
end
|
||||
|
||||
local function starts_with(str, start)
|
||||
return str:sub(1, #start) == start
|
||||
end
|
||||
|
||||
local function find_option(options, value)
|
||||
for i, str in pairs(options) do
|
||||
if starts_with(str, value) then
|
||||
return i
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
create_option_cycle_custom = function (ref_value, localization, change_function, options)
|
||||
local options_loc = localize(options)
|
||||
|
||||
local cycle = create_option_cycle({w = 3, label = localize(localization),scale = 0.7, options = options_loc,
|
||||
opt_callback = change_function, current_option = find_option(options_loc, Cartomancer.SETTINGS[ref_value])})
|
||||
|
||||
cycle.config.padding = 0
|
||||
|
||||
return
|
||||
{n = G.UIT.R, config = {align = "cl", padding = 0.05}, w = 0.4, colour = G.C.CHIPS, nodes = {
|
||||
cycle
|
||||
}}
|
||||
end
|
||||
|
||||
create_toggle_option = function (args)
|
||||
return {n = G.UIT.R, config = {align = "cl", padding = 0.05}, nodes = {
|
||||
{n = G.UIT.C, config = { align = "c", padding = 0 }, nodes = {
|
||||
{ n = G.UIT.T, config = { text = localize(args.localization), scale = 0.35, colour = G.C.UI.TEXT_LIGHT }},
|
||||
}},
|
||||
{n = G.UIT.C, config = { align = "cr", padding = 0.05 }, nodes = {
|
||||
create_toggle{ col = true, label = "", scale = 0.70, w = 0, shadow = true, ref_table = Cartomancer.SETTINGS, ref_value = args.ref_value, callback = args.callback },
|
||||
}},
|
||||
}}
|
||||
end
|
||||
|
||||
create_keybind = function (args)
|
||||
assert(args.name, "Missing `name` in create_keybind " .. Cartomancer.dump(args))
|
||||
|
||||
local ref_table = {
|
||||
name = args.name,
|
||||
label = {
|
||||
text = Cartomancer.table_join_keys(Cartomancer.SETTINGS.keybinds[args.name], "+")
|
||||
},
|
||||
}
|
||||
|
||||
local id = 'kb_'..args.name
|
||||
|
||||
return
|
||||
{n = G.UIT.R, config = {align = "cr", padding = 0.05}, nodes = {
|
||||
{n = G.UIT.C, config = { align = "cl", padding = 0 }, nodes = {
|
||||
{ n = G.UIT.T, config = { text = localize(args.localization), scale = 0.35, colour = G.C.UI.TEXT_LIGHT }},
|
||||
}},
|
||||
{n = G.UIT.C, config = { align = "cr", padding = 0.05 }, nodes = {
|
||||
UIBox_button({id = id, ref_table = ref_table, colour = G.C.GREY, button = 'cartomancer_settings_change_keybind', label = {}, dynamic_label = ref_table.label,
|
||||
minh = 0.32, minw = 3, col = true, scale = 0.3,
|
||||
})
|
||||
}},
|
||||
}}
|
||||
end
|
||||
|
||||
create_input_option = function (ref_value, localization, max_length)
|
||||
return { n = G.UIT.R, config = {align = "cl", minw = 4, minh = 0.5, colour = G.C.CLEAR, padding = 0.05}, nodes = {
|
||||
{ n = G.UIT.T, config = {text = localize(localization), scale = .36, minw = 4, minh = 0.5, colour = G.C.WHITE} },
|
||||
create_text_input({ id = 'Input:'..ref_value, w = 2, max_length = max_length or 3, prompt_text = tostring(Cartomancer.SETTINGS[ref_value]), ref_table = Cartomancer.SETTINGS, ref_value = ref_value})
|
||||
}}
|
||||
end
|
||||
|
||||
create_text_line = function(args)
|
||||
return { n = G.UIT.R, config = {align = "cl", minw = 4, minh = 0.5, padding = 0.05, colour = G.C.CLEAR}, nodes = {
|
||||
{ n = G.UIT.T, config = {text = localize(args.loc), scale = .36, minw = 4, minh = 0.5, colour = G.C.WHITE} },
|
||||
}}
|
||||
end
|
||||
|
||||
create_column_tabs = function (args)
|
||||
args = args or {}
|
||||
args.colour = args.colour or G.C.CLEAR
|
||||
args.tab_alignment = args.tab_alignment or 'cl'
|
||||
args.opt_callback = args.opt_callback or nil
|
||||
args.scale = args.scale or 1
|
||||
args.tab_w = args.tab_w or 0
|
||||
args.tab_h = args.tab_h or 0
|
||||
args.text_scale = (args.text_scale or 0.5)
|
||||
|
||||
local tab_buttons = {}
|
||||
|
||||
for k, v in ipairs(args.tabs) do
|
||||
if v.chosen then args.current = {k = k, v = v} end
|
||||
local id = 'tab_but_'..(v.label or '')
|
||||
tab_buttons[#tab_buttons+1] = {n=G.UIT.R, config={align = "cm"}, nodes={
|
||||
UIBox_button({id = id, ref_table = v, button = 'cartomancer_settings_change_tab', label = {v.label},
|
||||
minh = 0.8*args.scale, minw = 2.5*args.scale, col = true, choice = true, scale = args.text_scale,
|
||||
chosen = v.chosen and 'vert', func = v.func, focus_args = {type = 'none'}})
|
||||
}}
|
||||
end
|
||||
|
||||
-- Tabs + Contents
|
||||
return {n=G.UIT.R, config={padding = 0.2, align = "cl", colour = args.colour,},
|
||||
|
||||
nodes={
|
||||
-- Tabs
|
||||
{n=G.UIT.C, config={align = "cl", padding = 0.2, colour = G.C.CLEAR}, nodes=tab_buttons},
|
||||
|
||||
-- Tab contents
|
||||
{n=G.UIT.C, config={align = args.tab_alignment, padding = args.padding or 0.1, no_fill = true, minh = args.tab_h, minw = args.tab_w}, nodes={
|
||||
{n=G.UIT.O, config={id = 'cartomancer_settings_tab_contents',
|
||||
old_chosen = tab_buttons[1].nodes[1].nodes[1],
|
||||
object = UIBox{definition = args.current.v.tab_definition_function(args.current.v.tab_definition_function_args),
|
||||
config = {offset = {x=0,y=0}}}}
|
||||
}
|
||||
}},
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
G.FUNCS.cartomancer_deck_view_pos_vertical = function(args)
|
||||
Cartomancer.SETTINGS.deck_view_stack_pos_vertical = args.to_val
|
||||
end
|
||||
|
||||
G.FUNCS.cartomancer_deck_view_pos_horizontal = function(args)
|
||||
Cartomancer.SETTINGS.deck_view_stack_pos_horizontal = args.to_val
|
||||
end
|
||||
|
||||
G.FUNCS.cartomancer_settings_change_keybind = function(e)
|
||||
local name = e.config.ref_table.name
|
||||
local dynamic_label = e.config.ref_table.label
|
||||
dynamic_label.text = localize "carto_waiting_keybind"
|
||||
|
||||
Cartomancer.record_keybind {
|
||||
name = name,
|
||||
callback = function (keys)
|
||||
if not keys then
|
||||
Cartomancer.log("No keys pressed! No keybind recorded")
|
||||
dynamic_label.text = 'error :c'
|
||||
return
|
||||
end
|
||||
dynamic_label.text = Cartomancer.table_join_keys(keys, "+")
|
||||
|
||||
Cartomancer.SETTINGS.keybinds[name] = keys
|
||||
Cartomancer.log("Saved keybind: " ..Cartomancer.table_join_keys(keys, "+"))
|
||||
end,
|
||||
press_callback = function (keys)
|
||||
dynamic_label.text = Cartomancer.table_join_keys(keys, "+")
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
||||
G.FUNCS.cartomancer_settings_change_tab = function(e)
|
||||
if not e then return end
|
||||
|
||||
local tab_contents = e.UIBox:get_UIE_by_ID('cartomancer_settings_tab_contents')
|
||||
if not tab_contents then return end
|
||||
-- Same tab, don't rebuild it.
|
||||
if tab_contents.config.oid == e.config.id then return end
|
||||
|
||||
if tab_contents.config.old_chosen then tab_contents.config.old_chosen.config.chosen = nil end
|
||||
|
||||
tab_contents.config.old_chosen = e
|
||||
e.config.chosen = 'vert'
|
||||
|
||||
tab_contents.config.oid = e.config.id
|
||||
tab_contents.config.object:remove()
|
||||
tab_contents.config.object = UIBox{
|
||||
definition = e.config.ref_table.tab_definition_function(e.config.ref_table.tab_definition_function_args),
|
||||
config = {offset = {x=0,y=0}, parent = tab_contents, type = 'cm'}
|
||||
}
|
||||
tab_contents.UIBox:recalculate()
|
||||
|
||||
end
|
||||
|
||||
Cartomancer.add_settings_icon = function ()
|
||||
if Cartomancer.use_smods() then return end
|
||||
local icon = Sprite(0,0,0.75,0.75,G.ASSET_ATLAS["cart_modicon"], {x=0, y=0})
|
||||
icon.states.drag.can = false
|
||||
return {n=G.UIT.C, config={align = "cm", padding = 0.05, r = 0.1, button = 'change_tab'}, nodes={
|
||||
{n=G.UIT.O, config={object = icon}},
|
||||
}}
|
||||
end
|
||||
|
||||
|
||||
--[=[
|
||||
{n=G.UIT.R, config={align = "cm", padding = 0.05, id = args.id or nil}, nodes={
|
||||
args.label and {n=G.UIT.R, config={align = "cm"}, nodes={
|
||||
{n=G.UIT.T, config={text = args.label, scale = 0.5*args.scale, colour = G.C.UI.TEXT_LIGHT}}
|
||||
}} or nil,
|
||||
{n=G.UIT.R, config={align = "cm", colour = G.C.CLEAR, padding = 0.0}, nodes = {
|
||||
{n=G.UIT.C, config={align = "cm", padding = 0.1, r = 0.1, colour = G.C.CLEAR, id = args.id and (not args.label and args.id or nil) or nil, focus_args = args.focus_args}, nodes={
|
||||
{n=G.UIT.C, config={align = "cm",r = 0.1, minw = 0.6*args.scale, hover = not disabled, colour = not disabled and args.colour or G.C.BLACK,shadow = not disabled, button = not disabled and 'option_cycle' or nil, ref_table = args, ref_value = 'l', focus_args = {type = 'none'}}, nodes={
|
||||
{n=G.UIT.T, config={ref_table = args, ref_value = 'l', scale = args.text_scale, colour = not disabled and G.C.UI.TEXT_LIGHT or G.C.UI.TEXT_INACTIVE}}
|
||||
}},
|
||||
args.mid and
|
||||
{n=G.UIT.C, config={id = 'cycle_main'}, nodes={
|
||||
{n=G.UIT.R, config={align = "cm", minh = 0.05}, nodes={
|
||||
args.mid
|
||||
}},
|
||||
not disabled and choice_pips or nil
|
||||
}}
|
||||
or {n=G.UIT.C, config={id = 'cycle_main', align = "cm", minw = args.w, minh = args.h, r = 0.1, padding = 0.05, colour = args.colour,emboss = 0.1, hover = true, can_collide = true, on_demand_tooltip = args.on_demand_tooltip}, nodes={
|
||||
{n=G.UIT.R, config={align = "cm"}, nodes={
|
||||
{n=G.UIT.R, config={align = "cm"}, nodes={
|
||||
{n=G.UIT.O, config={object = DynaText({string = {{ref_table = args, ref_value = "current_option_val"}}, colours = {G.C.UI.TEXT_LIGHT},pop_in = 0, pop_in_rate = 8, reset_pop_in = true,shadow = true, float = true, silent = true, bump = true, scale = args.text_scale, non_recalc = true})}},
|
||||
}},
|
||||
{n=G.UIT.R, config={align = "cm", minh = 0.05}, nodes={
|
||||
}},
|
||||
not disabled and choice_pips or nil
|
||||
}}
|
||||
}},
|
||||
{n=G.UIT.C, config={align = "cm",r = 0.1, minw = 0.6*args.scale, hover = not disabled, colour = not disabled and args.colour or G.C.BLACK,shadow = not disabled, button = not disabled and 'option_cycle' or nil, ref_table = args, ref_value = 'r', focus_args = {type = 'none'}}, nodes={
|
||||
{n=G.UIT.T, config={ref_table = args, ref_value = 'r', scale = args.text_scale, colour = not disabled and G.C.UI.TEXT_LIGHT or G.C.UI.TEXT_INACTIVE}}
|
||||
}},
|
||||
}}
|
||||
}},
|
||||
info,
|
||||
}}
|
||||
]=]--
|
||||
|
||||
create_inline_options = function (ref_value, localization, change_function, options)
|
||||
local options_loc = localize(options)
|
||||
|
||||
local cycle = create_option_cycle({w = 3, label = localize(localization),scale = 0.7, options = options_loc,
|
||||
opt_callback = change_function, current_option = find_option(options_loc, Cartomancer.SETTINGS[ref_value])})
|
||||
cycle.n = G.UIT.R
|
||||
cycle.config.align = "cl"
|
||||
cycle.config.padding = 0
|
||||
cycle.config.colour = G.C.RED
|
||||
cycle.config.minw = 6.5
|
||||
cycle.nodes[1].config.align = "cl"
|
||||
cycle.nodes[2].config.align = "cr"
|
||||
|
||||
for _, node in pairs(cycle.nodes) do
|
||||
node.n = G.UIT.C
|
||||
end
|
||||
|
||||
for _, node in pairs(cycle.nodes[2].nodes) do
|
||||
node.n = G.UIT.R
|
||||
end
|
||||
|
||||
return cycle
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
493
Cartomancer-v.4.10-fix-fix/libs/nativefs.lua
Normal file
|
@ -0,0 +1,493 @@
|
|||
--[[
|
||||
Copyright 2020 megagrump@pm.me
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
]]--
|
||||
|
||||
local ffi, bit = require('ffi'), require('bit')
|
||||
local C = ffi.C
|
||||
|
||||
local fopen, getcwd, chdir, unlink, mkdir, rmdir
|
||||
local BUFFERMODE, MODEMAP
|
||||
local ByteArray = ffi.typeof('unsigned char[?]')
|
||||
local function _ptr(p) return p ~= nil and p or nil end -- NULL pointer to nil
|
||||
|
||||
local File = {
|
||||
getBuffer = function(self) return self._bufferMode, self._bufferSize end,
|
||||
getFilename = function(self) return self._name end,
|
||||
getMode = function(self) return self._mode end,
|
||||
isOpen = function(self) return self._mode ~= 'c' and self._handle ~= nil end,
|
||||
}
|
||||
|
||||
function File:open(mode)
|
||||
if self._mode ~= 'c' then return false, "File " .. self._name .. " is already open" end
|
||||
if not MODEMAP[mode] then return false, "Invalid open mode for " .. self._name .. ": " .. mode end
|
||||
|
||||
local handle = _ptr(fopen(self._name, MODEMAP[mode]))
|
||||
if not handle then return false, "Could not open " .. self._name .. " in mode " .. mode end
|
||||
|
||||
self._handle, self._mode = ffi.gc(handle, C.fclose), mode
|
||||
self:setBuffer(self._bufferMode, self._bufferSize)
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function File:close()
|
||||
if self._mode == 'c' then return false, "File is not open" end
|
||||
C.fclose(ffi.gc(self._handle, nil))
|
||||
self._handle, self._mode = nil, 'c'
|
||||
return true
|
||||
end
|
||||
|
||||
function File:setBuffer(mode, size)
|
||||
local bufferMode = BUFFERMODE[mode]
|
||||
if not bufferMode then
|
||||
return false, "Invalid buffer mode " .. mode .. " (expected 'none', 'full', or 'line')"
|
||||
end
|
||||
|
||||
if mode == 'none' then
|
||||
size = math.max(0, size or 0)
|
||||
else
|
||||
size = math.max(2, size or 2) -- Windows requires buffer to be at least 2 bytes
|
||||
end
|
||||
|
||||
local success = self._mode == 'c' or C.setvbuf(self._handle, nil, bufferMode, size) == 0
|
||||
if not success then
|
||||
self._bufferMode, self._bufferSize = 'none', 0
|
||||
return false, "Could not set buffer mode"
|
||||
end
|
||||
|
||||
self._bufferMode, self._bufferSize = mode, size
|
||||
return true
|
||||
end
|
||||
|
||||
function File:getSize()
|
||||
-- NOTE: The correct way to do this would be a stat() call, which requires a
|
||||
-- lot more (system-specific) code. This is a shortcut that requires the file
|
||||
-- to be readable.
|
||||
local mustOpen = not self:isOpen()
|
||||
if mustOpen and not self:open('r') then return 0 end
|
||||
|
||||
local pos = mustOpen and 0 or self:tell()
|
||||
C.fseek(self._handle, 0, 2)
|
||||
local size = self:tell()
|
||||
if mustOpen then
|
||||
self:close()
|
||||
else
|
||||
self:seek(pos)
|
||||
end
|
||||
return size
|
||||
end
|
||||
|
||||
function File:read(containerOrBytes, bytes)
|
||||
if self._mode ~= 'r' then return nil, 0 end
|
||||
|
||||
local container = bytes ~= nil and containerOrBytes or 'string'
|
||||
if container ~= 'string' and container ~= 'data' then
|
||||
error("Invalid container type: " .. container)
|
||||
end
|
||||
|
||||
bytes = not bytes and containerOrBytes or 'all'
|
||||
bytes = bytes == 'all' and self:getSize() - self:tell() or math.min(self:getSize() - self:tell(), bytes)
|
||||
|
||||
if bytes <= 0 then
|
||||
local data = container == 'string' and '' or love.data.newFileData('', self._name)
|
||||
return data, 0
|
||||
end
|
||||
|
||||
local data = love.data.newByteData(bytes)
|
||||
local r = tonumber(C.fread(data:getFFIPointer(), 1, bytes, self._handle))
|
||||
|
||||
if container == 'data' then
|
||||
-- FileData from ByteData requires LÖVE 11.4+
|
||||
local ok, fd = pcall(love.filesystem.newFileData, data, self._name)
|
||||
if ok then return fd, r end
|
||||
end
|
||||
|
||||
local str = data:getString()
|
||||
data:release()
|
||||
data = container == 'data' and love.filesystem.newFileData(str, self._name) or str
|
||||
return data, r
|
||||
end
|
||||
|
||||
local function lines(file, autoclose)
|
||||
local BUFFERSIZE = 4096
|
||||
local buffer, bufferPos = ByteArray(BUFFERSIZE), 0
|
||||
local bytesRead = tonumber(C.fread(buffer, 1, BUFFERSIZE, file._handle))
|
||||
|
||||
local offset = file:tell()
|
||||
return function()
|
||||
file:seek(offset)
|
||||
|
||||
local line = {}
|
||||
while bytesRead > 0 do
|
||||
for i = bufferPos, bytesRead - 1 do
|
||||
if buffer[i] == 10 then -- end of line
|
||||
bufferPos = i + 1
|
||||
return table.concat(line)
|
||||
end
|
||||
|
||||
if buffer[i] ~= 13 then -- ignore CR
|
||||
table.insert(line, string.char(buffer[i]))
|
||||
end
|
||||
end
|
||||
|
||||
bytesRead = tonumber(C.fread(buffer, 1, BUFFERSIZE, file._handle))
|
||||
offset, bufferPos = offset + bytesRead, 0
|
||||
end
|
||||
|
||||
if not line[1] then
|
||||
if autoclose then file:close() end
|
||||
return nil
|
||||
end
|
||||
return table.concat(line)
|
||||
end
|
||||
end
|
||||
|
||||
function File:lines()
|
||||
if self._mode ~= 'r' then error("File is not opened for reading") end
|
||||
return lines(self)
|
||||
end
|
||||
|
||||
function File:write(data, size)
|
||||
if self._mode ~= 'w' and self._mode ~= 'a' then
|
||||
return false, "File " .. self._name .. " not opened for writing"
|
||||
end
|
||||
|
||||
local toWrite, writeSize
|
||||
if type(data) == 'string' then
|
||||
writeSize = (size == nil or size == 'all') and #data or size
|
||||
toWrite = data
|
||||
else
|
||||
writeSize = (size == nil or size == 'all') and data:getSize() or size
|
||||
toWrite = data:getFFIPointer()
|
||||
end
|
||||
|
||||
if tonumber(C.fwrite(toWrite, 1, writeSize, self._handle)) ~= writeSize then
|
||||
return false, "Could not write data"
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function File:seek(pos)
|
||||
return self._handle and C.fseek(self._handle, pos, 0) == 0
|
||||
end
|
||||
|
||||
function File:tell()
|
||||
if not self._handle then return nil, "Invalid position" end
|
||||
return tonumber(C.ftell(self._handle))
|
||||
end
|
||||
|
||||
function File:flush()
|
||||
if self._mode ~= 'w' and self._mode ~= 'a' then
|
||||
return nil, "File is not opened for writing"
|
||||
end
|
||||
return C.fflush(self._handle) == 0
|
||||
end
|
||||
|
||||
function File:isEOF()
|
||||
return not self:isOpen() or C.feof(self._handle) ~= 0 or self:tell() == self:getSize()
|
||||
end
|
||||
|
||||
function File:release()
|
||||
if self._mode ~= 'c' then self:close() end
|
||||
self._handle = nil
|
||||
end
|
||||
|
||||
function File:type() return 'File' end
|
||||
|
||||
function File:typeOf(t) return t == 'File' end
|
||||
|
||||
File.__index = File
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
local nativefs = {}
|
||||
local loveC = ffi.os == 'Windows' and ffi.load('love') or C
|
||||
|
||||
function nativefs.newFile(name)
|
||||
if type(name) ~= 'string' then
|
||||
error("bad argument #1 to 'newFile' (string expected, got " .. type(name) .. ")")
|
||||
end
|
||||
return setmetatable({
|
||||
_name = name,
|
||||
_mode = 'c',
|
||||
_handle = nil,
|
||||
_bufferSize = 0,
|
||||
_bufferMode = 'none'
|
||||
}, File)
|
||||
end
|
||||
|
||||
function nativefs.newFileData(filepath)
|
||||
local f = nativefs.newFile(filepath)
|
||||
local ok, err = f:open('r')
|
||||
if not ok then return nil, err end
|
||||
|
||||
local data, err = f:read('data', 'all')
|
||||
f:close()
|
||||
return data, err
|
||||
end
|
||||
|
||||
function nativefs.mount(archive, mountPoint, appendToPath)
|
||||
return loveC.PHYSFS_mount(archive, mountPoint, appendToPath and 1 or 0) ~= 0
|
||||
end
|
||||
|
||||
function nativefs.unmount(archive)
|
||||
return loveC.PHYSFS_unmount(archive) ~= 0
|
||||
end
|
||||
|
||||
function nativefs.read(containerOrName, nameOrSize, sizeOrNil)
|
||||
local container, name, size
|
||||
if sizeOrNil then
|
||||
container, name, size = containerOrName, nameOrSize, sizeOrNil
|
||||
elseif not nameOrSize then
|
||||
container, name, size = 'string', containerOrName, 'all'
|
||||
else
|
||||
if type(nameOrSize) == 'number' or nameOrSize == 'all' then
|
||||
container, name, size = 'string', containerOrName, nameOrSize
|
||||
else
|
||||
container, name, size = containerOrName, nameOrSize, 'all'
|
||||
end
|
||||
end
|
||||
|
||||
local file = nativefs.newFile(name)
|
||||
local ok, err = file:open('r')
|
||||
if not ok then return nil, err end
|
||||
|
||||
local data, size = file:read(container, size)
|
||||
file:close()
|
||||
return data, size
|
||||
end
|
||||
|
||||
local function writeFile(mode, name, data, size)
|
||||
local file = nativefs.newFile(name)
|
||||
local ok, err = file:open(mode)
|
||||
if not ok then return nil, err end
|
||||
|
||||
ok, err = file:write(data, size or 'all')
|
||||
file:close()
|
||||
return ok, err
|
||||
end
|
||||
|
||||
function nativefs.write(name, data, size)
|
||||
return writeFile('w', name, data, size)
|
||||
end
|
||||
|
||||
function nativefs.append(name, data, size)
|
||||
return writeFile('a', name, data, size)
|
||||
end
|
||||
|
||||
function nativefs.lines(name)
|
||||
local f = nativefs.newFile(name)
|
||||
local ok, err = f:open('r')
|
||||
if not ok then return nil, err end
|
||||
return lines(f, true)
|
||||
end
|
||||
|
||||
function nativefs.load(name)
|
||||
local chunk, err = nativefs.read(name)
|
||||
if not chunk then return nil, err end
|
||||
return loadstring(chunk, name)
|
||||
end
|
||||
|
||||
function nativefs.getWorkingDirectory()
|
||||
return getcwd()
|
||||
end
|
||||
|
||||
function nativefs.setWorkingDirectory(path)
|
||||
if not chdir(path) then return false, "Could not set working directory" end
|
||||
return true
|
||||
end
|
||||
|
||||
function nativefs.getDriveList()
|
||||
if ffi.os ~= 'Windows' then return { '/' } end
|
||||
local drives, bits = {}, C.GetLogicalDrives()
|
||||
for i = 0, 25 do
|
||||
if bit.band(bits, 2 ^ i) > 0 then
|
||||
table.insert(drives, string.char(65 + i) .. ':/')
|
||||
end
|
||||
end
|
||||
return drives
|
||||
end
|
||||
|
||||
function nativefs.createDirectory(path)
|
||||
local current = path:sub(1, 1) == '/' and '/' or ''
|
||||
for dir in path:gmatch('[^/\\]+') do
|
||||
current = current .. dir .. '/'
|
||||
local info = nativefs.getInfo(current, 'directory')
|
||||
if not info and not mkdir(current) then return false, "Could not create directory " .. current end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function nativefs.remove(name)
|
||||
local info = nativefs.getInfo(name)
|
||||
if not info then return false, "Could not remove " .. name end
|
||||
if info.type == 'directory' then
|
||||
if not rmdir(name) then return false, "Could not remove directory " .. name end
|
||||
return true
|
||||
end
|
||||
if not unlink(name) then return false, "Could not remove file " .. name end
|
||||
return true
|
||||
end
|
||||
|
||||
local function withTempMount(dir, fn, ...)
|
||||
local mountPoint = _ptr(loveC.PHYSFS_getMountPoint(dir))
|
||||
if mountPoint then return fn(ffi.string(mountPoint), ...) end
|
||||
if not nativefs.mount(dir, '__nativefs__temp__') then return false, "Could not mount " .. dir end
|
||||
local a, b = fn('__nativefs__temp__', ...)
|
||||
nativefs.unmount(dir)
|
||||
return a, b
|
||||
end
|
||||
|
||||
function nativefs.getDirectoryItems(dir)
|
||||
local result, err = withTempMount(dir, love.filesystem.getDirectoryItems)
|
||||
return result or {}
|
||||
end
|
||||
|
||||
local function getDirectoryItemsInfo(path, filtertype)
|
||||
local items = {}
|
||||
local files = love.filesystem.getDirectoryItems(path)
|
||||
for i = 1, #files do
|
||||
local filepath = string.format('%s/%s', path, files[i])
|
||||
local info = love.filesystem.getInfo(filepath, filtertype)
|
||||
if info then
|
||||
info.name = files[i]
|
||||
table.insert(items, info)
|
||||
end
|
||||
end
|
||||
return items
|
||||
end
|
||||
|
||||
function nativefs.getDirectoryItemsInfo(path, filtertype)
|
||||
local result, err = withTempMount(path, getDirectoryItemsInfo, filtertype)
|
||||
return result or {}
|
||||
end
|
||||
|
||||
local function getInfo(path, file, filtertype)
|
||||
local filepath = string.format('%s/%s', path, file)
|
||||
return love.filesystem.getInfo(filepath, filtertype)
|
||||
end
|
||||
|
||||
local function leaf(p)
|
||||
p = p:gsub('\\', '/')
|
||||
local last, a = p, 1
|
||||
while a do
|
||||
a = p:find('/', a + 1)
|
||||
if a then
|
||||
last = p:sub(a + 1)
|
||||
end
|
||||
end
|
||||
return last
|
||||
end
|
||||
|
||||
function nativefs.getInfo(path, filtertype)
|
||||
local dir = path:match("(.*[\\/]).*$") or './'
|
||||
local file = leaf(path)
|
||||
local result, err = withTempMount(dir, getInfo, file, filtertype)
|
||||
return result or nil
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
|
||||
MODEMAP = { r = 'rb', w = 'wb', a = 'ab' }
|
||||
local MAX_PATH = 4096
|
||||
|
||||
ffi.cdef([[
|
||||
int PHYSFS_mount(const char* dir, const char* mountPoint, int appendToPath);
|
||||
int PHYSFS_unmount(const char* dir);
|
||||
const char* PHYSFS_getMountPoint(const char* dir);
|
||||
|
||||
typedef struct FILE FILE;
|
||||
|
||||
FILE* fopen(const char* path, const char* mode);
|
||||
size_t fread(void* ptr, size_t size, size_t nmemb, FILE* stream);
|
||||
size_t fwrite(const void* ptr, size_t size, size_t nmemb, FILE* stream);
|
||||
int fclose(FILE* stream);
|
||||
int fflush(FILE* stream);
|
||||
size_t fseek(FILE* stream, size_t offset, int whence);
|
||||
size_t ftell(FILE* stream);
|
||||
int setvbuf(FILE* stream, char* buffer, int mode, size_t size);
|
||||
int feof(FILE* stream);
|
||||
]])
|
||||
|
||||
if ffi.os == 'Windows' then
|
||||
ffi.cdef([[
|
||||
int MultiByteToWideChar(unsigned int cp, uint32_t flags, const char* mb, int cmb, const wchar_t* wc, int cwc);
|
||||
int WideCharToMultiByte(unsigned int cp, uint32_t flags, const wchar_t* wc, int cwc, const char* mb,
|
||||
int cmb, const char* def, int* used);
|
||||
int GetLogicalDrives(void);
|
||||
int CreateDirectoryW(const wchar_t* path, void*);
|
||||
int _wchdir(const wchar_t* path);
|
||||
wchar_t* _wgetcwd(wchar_t* buffer, int maxlen);
|
||||
FILE* _wfopen(const wchar_t* path, const wchar_t* mode);
|
||||
int _wunlink(const wchar_t* path);
|
||||
int _wrmdir(const wchar_t* path);
|
||||
]])
|
||||
|
||||
BUFFERMODE = { full = 0, line = 64, none = 4 }
|
||||
|
||||
local function towidestring(str)
|
||||
local size = C.MultiByteToWideChar(65001, 0, str, #str, nil, 0)
|
||||
local buf = ffi.new('wchar_t[?]', size + 1)
|
||||
C.MultiByteToWideChar(65001, 0, str, #str, buf, size)
|
||||
return buf
|
||||
end
|
||||
|
||||
local function toutf8string(wstr)
|
||||
local size = C.WideCharToMultiByte(65001, 0, wstr, -1, nil, 0, nil, nil)
|
||||
local buf = ffi.new('char[?]', size + 1)
|
||||
C.WideCharToMultiByte(65001, 0, wstr, -1, buf, size, nil, nil)
|
||||
return ffi.string(buf)
|
||||
end
|
||||
|
||||
local nameBuffer = ffi.new('wchar_t[?]', MAX_PATH + 1)
|
||||
|
||||
fopen = function(path, mode) return C._wfopen(towidestring(path), towidestring(mode)) end
|
||||
getcwd = function() return toutf8string(C._wgetcwd(nameBuffer, MAX_PATH)) end
|
||||
chdir = function(path) return C._wchdir(towidestring(path)) == 0 end
|
||||
unlink = function(path) return C._wunlink(towidestring(path)) == 0 end
|
||||
mkdir = function(path) return C.CreateDirectoryW(towidestring(path), nil) ~= 0 end
|
||||
rmdir = function(path) return C._wrmdir(towidestring(path)) == 0 end
|
||||
else
|
||||
BUFFERMODE = { full = 0, line = 1, none = 2 }
|
||||
|
||||
ffi.cdef([[
|
||||
char* getcwd(char *buffer, int maxlen);
|
||||
int chdir(const char* path);
|
||||
int unlink(const char* path);
|
||||
int mkdir(const char* path, int mode);
|
||||
int rmdir(const char* path);
|
||||
]])
|
||||
|
||||
local nameBuffer = ByteArray(MAX_PATH)
|
||||
|
||||
fopen = C.fopen
|
||||
unlink = function(path) return ffi.C.unlink(path) == 0 end
|
||||
chdir = function(path) return ffi.C.chdir(path) == 0 end
|
||||
mkdir = function(path) return ffi.C.mkdir(path, 0x1ed) == 0 end
|
||||
rmdir = function(path) return ffi.C.rmdir(path) == 0 end
|
||||
|
||||
getcwd = function()
|
||||
local cwd = _ptr(C.getcwd(nameBuffer, MAX_PATH))
|
||||
return cwd and ffi.string(cwd) or nil
|
||||
end
|
||||
end
|
||||
|
||||
return nativefs
|
63
Cartomancer-v.4.10-fix-fix/localization/en-us.lua
Normal file
|
@ -0,0 +1,63 @@
|
|||
return {
|
||||
misc = {
|
||||
dictionary = {
|
||||
carto_settings_compact_deck = "Compact deck",
|
||||
carto_settings_deck_view = "Deck view",
|
||||
carto_settings_jokers = "Jokers",
|
||||
carto_settings_flames = "Flames",
|
||||
carto_settings_other = "Other",
|
||||
carto_settings_keybinds = "Keybinds",
|
||||
|
||||
carto_compact_deck_enabled = "Limit cards in deck pile",
|
||||
carto_compact_deck_visible_cards = "Cards limit ",
|
||||
|
||||
carto_deck_view_stack_enabled = "Stack cards in deck view",
|
||||
carto_deck_view_hide_drawn_cards = "Hide drawn cards",
|
||||
carto_deck_view_stack_modifiers = "Stack all modifiers",
|
||||
carto_deck_view_stack_chips = "Stack different chip values",
|
||||
-- carto_deck_view_stack_suits = "Stack all suits", -- Do not think this is necessary if steamodded adds suit pages.
|
||||
carto_deck_view_stack_x_color = "Stack display color (hex) ",
|
||||
carto_deck_view_stack_background_opacity = "Stack display opacity ",
|
||||
carto_deck_view_stack_pos_vertical = "Vertical stack alignment ",
|
||||
carto_deck_view_stack_pos_vertical_options = {
|
||||
"top",
|
||||
"center",
|
||||
"bottom"
|
||||
},
|
||||
carto_deck_view_stack_pos_horizontal = "Horizontal stack alignment ",
|
||||
carto_deck_view_stack_pos_horizontal_options = {
|
||||
"left",
|
||||
"middle",
|
||||
"right"
|
||||
},
|
||||
carto_deck_view_unique_cards = "Unique cards:",
|
||||
|
||||
carto_draw_non_essential_shaders = "Draw non-essential shaders",
|
||||
carto_improved_hand_sorting = "Improved hand sorting",
|
||||
carto_hide_tags = "Hide tags",
|
||||
carto_hide_consumables = "Hide consumables",
|
||||
carto_hide_deck = "Hide deck",
|
||||
carto_hide_jokers = "Hide jokers",
|
||||
|
||||
carto_flames_intensity_min = "Min intensity ",
|
||||
carto_flames_intensity_max = "Max intensity ",
|
||||
carto_flames_relative_intensity = "Relative score intensity",
|
||||
carto_flames_slower_speed = "Slower flames on big scores",
|
||||
carto_flames_volume = "Flames volume ",
|
||||
|
||||
carto_jokers_controls_buttons = "Show joker area buttons",
|
||||
carto_jokers_controls_show_after = "after total # of jokers above ",
|
||||
--carto_jokers_hide_keybind = "Hide hovered joker with Alt + 1",
|
||||
carto_jokers_hide = "Hide",
|
||||
carto_jokers_show = "Show",
|
||||
carto_jokers_zoom = "Zoom",
|
||||
|
||||
carto_waiting_keybind = "Waiting for input...",
|
||||
carto_kb_hide_joker = "Hide joker",
|
||||
carto_kb_toggle_tags = "Toggle tags visibility",
|
||||
carto_kb_toggle_consumables = "Toggle consumables visibility",
|
||||
carto_kb_toggle_jokers = "Toggle jokers visibility",
|
||||
carto_kb_toggle_jokers_buttons = "Toggle jokers buttons",
|
||||
}
|
||||
}
|
||||
}
|
25
Cartomancer-v.4.10-fix-fix/lovely.toml
Normal file
|
@ -0,0 +1,25 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 11
|
||||
|
||||
[[patches]]
|
||||
[patches.module]
|
||||
source = "libs/nativefs.lua"
|
||||
before = "main.lua"
|
||||
name = "cartomancer.nfs"
|
||||
|
||||
[[patches]]
|
||||
[patches.module]
|
||||
source = "internal/init.lua"
|
||||
before = "main.lua"
|
||||
name = "cartomancer.init"
|
||||
|
||||
# Add core functionality
|
||||
[[patches]]
|
||||
[patches.copy]
|
||||
target = "main.lua"
|
||||
position = "append"
|
||||
sources = [
|
||||
"cartomancer.lua",
|
||||
]
|
14
Cartomancer-v.4.10-fix-fix/lovely/apply-before-smods.toml
Normal file
|
@ -0,0 +1,14 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 0
|
||||
|
||||
# Patches applied before steamodded.
|
||||
|
||||
[[patches]]
|
||||
[patches.copy]
|
||||
target = "main.lua"
|
||||
position = "prepend"
|
||||
sources = [
|
||||
"core/view-deck-steamodded.lua",
|
||||
]
|
49
Cartomancer-v.4.10-fix-fix/lovely/dynamic-ante-display.toml
Normal file
|
@ -0,0 +1,49 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 0
|
||||
|
||||
# Patch dynamic ante display into
|
||||
# function create_UIBox_your_collection_blinds(exit)
|
||||
# this will only work for vanilla, as steamodded overrides this
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/UI_definitions.lua"
|
||||
pattern = "local ante_amounts = {}"
|
||||
position = "before"
|
||||
payload = '''
|
||||
local min_ante = 1
|
||||
local max_ante = 16
|
||||
local spacing = 1 - 15*0.06
|
||||
if G.GAME and G.GAME.round_resets and G.GAME.round_resets.ante then
|
||||
local current_ante = G.GAME.round_resets.ante
|
||||
|
||||
if current_ante > 8 then
|
||||
min_ante = current_ante - 8 + 1
|
||||
max_ante = current_ante + 8
|
||||
end
|
||||
end
|
||||
'''
|
||||
match_indent = true
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/UI_definitions.lua"
|
||||
pattern = "for i = 1, math.min(16, math.max(16, G.PROFILES[G.SETTINGS.profile].high_scores.furthest_ante.amt)) do"
|
||||
position = "at"
|
||||
payload = '''
|
||||
for i = min_ante, max_ante do
|
||||
'''
|
||||
match_indent = true
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/UI_definitions.lua"
|
||||
pattern = "local spacing = 1 - math.min(20, math.max(15, G.PROFILES[G.SETTINGS.profile].high_scores.furthest_ante.amt))*0.06"
|
||||
position = "at"
|
||||
payload = '''
|
||||
-- :3
|
||||
'''
|
||||
match_indent = true
|
||||
|
30
Cartomancer-v.4.10-fix-fix/lovely/fixed-flames.toml
Normal file
|
@ -0,0 +1,30 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 69
|
||||
|
||||
|
||||
[[patches]]
|
||||
[patches.regex]
|
||||
target = "functions/button_callbacks.lua"
|
||||
position = "at"
|
||||
pattern = '''
|
||||
(?<value>math\.max\(0\., math\.log\(G\.ARGS\.score_intensity\.earned_score, 5\)-2\))'''
|
||||
payload = "Cartomancer.get_flames_intensity()"
|
||||
|
||||
[[patches]]
|
||||
[patches.regex]
|
||||
target = "functions/misc_functions.lua"
|
||||
position = "at"
|
||||
pattern = '''
|
||||
(?<value>\(not G\.video_organ and G\.STATE == G\.STATES\.SPLASH\) and 0 or AC\[k\]\.vol and v\.volfunc\(AC\[k\]\.vol\) or 0)'''
|
||||
payload = "Cartomancer.handle_flames_volume($value)"
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = 'functions/button_callbacks.lua'
|
||||
pattern = '''_F.timer = _F.timer + G.real_dt*(1 + _F.intensity*0.2)'''
|
||||
position = 'at'
|
||||
payload = '''
|
||||
_F.timer = Cartomancer.handle_flames_timer(_F.timer, _F.intensity)'''
|
||||
match_indent = true
|
30
Cartomancer-v.4.10-fix-fix/lovely/hand-sorting.toml
Normal file
|
@ -0,0 +1,30 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 0
|
||||
|
||||
# Add no sort button to
|
||||
# create_UIBox_buttons
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/UI_definitions.lua"
|
||||
pattern = '''
|
||||
{n=G.UIT.T, config={text = localize('b_sort_hand'), scale = text_scale*0.8, colour = G.C.UI.TEXT_LIGHT}}'''
|
||||
position = "before"
|
||||
payload = '''
|
||||
Cartomancer.SETTINGS.improved_hand_sorting and
|
||||
create_toggle{ col = true, label = localize('b_sort_hand'), label_scale = text_scale*0.8, scale = 0.30, w = 0, shadow = true, ref_table = G.hand, ref_value = 'cart_sorting', callback = function () G.FUNCS.cartomancer_sort_hand_off() end }
|
||||
or'''
|
||||
match_indent = true
|
||||
|
||||
# Set default value of G.hand.cart_sorting
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/UI_definitions.lua"
|
||||
pattern = '''
|
||||
function create_UIBox_buttons()'''
|
||||
position = "after"
|
||||
payload = '''
|
||||
if G.hand and G.hand.cart_sorting == nil then G.hand.cart_sorting = true end
|
||||
'''
|
||||
match_indent = true
|
28
Cartomancer-v.4.10-fix-fix/lovely/hidden-jokers.toml
Normal file
|
@ -0,0 +1,28 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 69
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "cardarea.lua"
|
||||
pattern = "self.children.area_uibox:draw()"
|
||||
position = "after"
|
||||
payload = '''
|
||||
if self == G.jokers then
|
||||
Cartomancer.add_visibility_controls()
|
||||
end
|
||||
'''
|
||||
match_indent = true
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "cardarea.lua"
|
||||
pattern = "function CardArea:emplace(card, location, stay_flipped)"
|
||||
position = "after"
|
||||
payload = '''
|
||||
if self == G.jokers then
|
||||
Cartomancer.handle_joker_added(card)
|
||||
end
|
||||
'''
|
||||
match_indent = true
|
20
Cartomancer-v.4.10-fix-fix/lovely/keybinds.toml
Normal file
|
@ -0,0 +1,20 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 69
|
||||
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = 'engine/controller.lua'
|
||||
pattern = "function Controller:key_press_update(key, dt)"
|
||||
position = "after"
|
||||
payload = '''
|
||||
if key == "escape" and Cartomancer.INTERNAL_in_config then
|
||||
Cartomancer.INTERNAL_in_config = false
|
||||
if not Cartomancer.use_smods() then
|
||||
Cartomancer.save_config()
|
||||
end
|
||||
end
|
||||
'''
|
||||
match_indent = true
|
86
Cartomancer-v.4.10-fix-fix/lovely/limit-deck-size.toml
Normal file
|
@ -0,0 +1,86 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 69
|
||||
|
||||
# Make all drawn cards visible
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "cardarea.lua"
|
||||
pattern = "local stay_flipped = G.GAME and G.GAME.blind and G.GAME.blind:stay_flipped(self, card)"
|
||||
position = "before"
|
||||
payload = '''
|
||||
if self == G.hand and not card.states.visible then
|
||||
card.states.visible = true
|
||||
end'''
|
||||
match_indent = true
|
||||
|
||||
# Fix drawing specific card staying invisible
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/common_events.lua"
|
||||
pattern = "local stay_flipped = G.GAME and G.GAME.blind and G.GAME.blind:stay_flipped(to, card)"
|
||||
position = "before"
|
||||
payload = '''
|
||||
if card and to == G.hand and not card.states.visible then
|
||||
card.states.visible = true
|
||||
end'''
|
||||
match_indent = true
|
||||
|
||||
# Replace drawing deck pile
|
||||
|
||||
[[patches]]
|
||||
[patches.regex]
|
||||
target = "cardarea.lua"
|
||||
pattern = '''
|
||||
(?<indent>[\t ]*)local deck_height \= \(self\.config\.deck_height or 0\.15\)\/52
|
||||
[\t ]*for k, card in ipairs\(self\.cards\) do
|
||||
[\t ]* if card\.facing \=\= 'front' then card\:flip\(\) end
|
||||
[\t ]*
|
||||
[\t ]* if not card\.states\.drag\.is then
|
||||
[\t ]* card\.T\.x \= self\.T\.x \+ 0\.5\*\(self\.T\.w \- card\.T\.w\) \+ self\.shadow_parrallax\.x\*deck_height\*\(\#self\.cards\/\(self \=\= G\.deck and 1 or 2\) \- k\) \+ 0\.9\*self\.shuffle_amt\*\(1 \- k\*0\.01\)\*\(k%2 \=\= 1 and 1 or \-0\)
|
||||
[\t ]* card\.T\.y \= self\.T\.y \+ 0\.5\*\(self\.T\.h \- card\.T\.h\) \+ self\.shadow_parrallax\.y\*deck_height\*\(\#self\.cards\/\(self \=\= G\.deck and 1 or 2\) \- k\)
|
||||
[\t ]* card\.T\.r \= 0 \+ 0\.3\*self\.shuffle_amt\*\(1 \+ k\*0\.05\)\*\(k%2 \=\= 1 and 1 or \-0\)
|
||||
[\t ]* card\.T\.x \= card\.T\.x \+ card\.shadow_parrallax\.x\/30
|
||||
[\t ]* end
|
||||
[\t ]*end'''
|
||||
position = "at"
|
||||
payload = '''
|
||||
local display_limit
|
||||
if not Cartomancer.SETTINGS.compact_deck_enabled then
|
||||
display_limit = 999999
|
||||
else
|
||||
display_limit = Cartomancer.SETTINGS.compact_deck_visible_cards
|
||||
end
|
||||
|
||||
local deck_height = (self.config.deck_height or 0.15)/52
|
||||
local total_cards = #self.cards <= display_limit and #self.cards or display_limit -- limit height
|
||||
local fixedX, fixedY, fixedR = nil, nil, nil
|
||||
|
||||
for k, card in ipairs(self.cards) do
|
||||
if card.facing == 'front' then card:flip() end
|
||||
|
||||
if not card.states.drag.is then
|
||||
if fixedX then
|
||||
card.T.x = fixedX
|
||||
card.T.y = fixedY
|
||||
card.T.r = fixedR -- rotation
|
||||
card.states.visible = false
|
||||
else
|
||||
card.T.x = self.T.x + 0.5*(self.T.w - card.T.w) + self.shadow_parrallax.x*deck_height*(total_cards/(self == G.deck and 1 or 2) - k) + 0.9*self.shuffle_amt*(1 - k*0.01)*(k%2 == 1 and 1 or -0)
|
||||
card.T.y = self.T.y + 0.5*(self.T.h - card.T.h) + self.shadow_parrallax.y*deck_height*(total_cards/(self == G.deck and 1 or 2) - k)
|
||||
card.T.r = 0 + 0.3*self.shuffle_amt*(1 + k*0.05)*(k%2 == 1 and 1 or -0)
|
||||
card.T.x = card.T.x + card.shadow_parrallax.x/30
|
||||
card.states.visible = true
|
||||
|
||||
if k >= display_limit then
|
||||
fixedX = card.T.x
|
||||
fixedY = card.T.y
|
||||
fixedR = card.T.r
|
||||
end
|
||||
end
|
||||
end
|
||||
end'''
|
||||
line_prepend = '$indent'
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 69
|
||||
|
||||
# Add unique count
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "main.lua"
|
||||
match_indent = true
|
||||
pattern = "modded and {"
|
||||
position = "before"
|
||||
payload = '''
|
||||
not unplayed_only and Cartomancer.add_unique_count() or nil, -- Cartomancer Steamodded 0.9.8 compatibility'''
|
|
@ -0,0 +1,31 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 69
|
||||
|
||||
# Initialize upvalue from file above, and override NFS.read now.
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "main.lua"
|
||||
match_indent = true
|
||||
pattern = "SMODS.path = find_self(SMODS.MODS_DIR, 'core.lua', '--- STEAMODDED CORE')"
|
||||
position = "after"
|
||||
payload = '''
|
||||
|
||||
Cartomancer_nfs_read = NFS.read
|
||||
NFS.read = Cartomancer_nfs_read_override
|
||||
|
||||
'''
|
||||
|
||||
# todo : use lovely for view deck patches
|
||||
|
||||
#[[patches]]
|
||||
#[patches.pattern]
|
||||
#target = "Steamodded - src/overrides.lua"
|
||||
#match_indent = true
|
||||
#pattern = "--- STEAMODDED CORE"
|
||||
#position = "after"
|
||||
#payload = '''
|
||||
#-- YO WHADDUP
|
||||
#print"------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
|
||||
#'''
|
118
Cartomancer-v.4.10-fix-fix/lovely/stackable-deck-vanilla.toml
Normal file
|
@ -0,0 +1,118 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 69
|
||||
|
||||
#
|
||||
# Vanilla patches
|
||||
#
|
||||
|
||||
# Overwrite how suits are added
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/UI_definitions.lua"
|
||||
pattern = "table.insert(SUITS[v.base.suit], v)"
|
||||
position = "at"
|
||||
payload = '''
|
||||
local greyed
|
||||
if unplayed_only and not ((v.area and v.area == G.deck) or v.ability.wheel_flipped) then
|
||||
greyed = true
|
||||
end
|
||||
local card_string = v:cart_to_string()
|
||||
if greyed then
|
||||
card_string = card_string .. "Greyed"
|
||||
end
|
||||
if greyed and Cartomancer.SETTINGS.deck_view_hide_drawn_cards then
|
||||
-- Ignore this card.
|
||||
elseif not SUITS[v.base.suit][card_string] then
|
||||
table.insert(SUITS_SORTED[v.base.suit], card_string)
|
||||
|
||||
local _scale = 0.7
|
||||
local copy = copy_card(v, nil, _scale)
|
||||
|
||||
copy.greyed = greyed
|
||||
copy.stacked_quantity = 1
|
||||
|
||||
SUITS[v.base.suit][card_string] = copy
|
||||
else
|
||||
local stacked_card = SUITS[v.base.suit][card_string]
|
||||
stacked_card.stacked_quantity = stacked_card.stacked_quantity + 1
|
||||
end'''
|
||||
match_indent = true
|
||||
|
||||
[[patches]]
|
||||
[patches.regex]
|
||||
target = "functions/UI_definitions.lua"
|
||||
pattern = '''
|
||||
if SUITS\[suit_map\[j\]\]\[1\] then
|
||||
[\t ]*local view_deck = CardArea\('''
|
||||
position = "at"
|
||||
payload = '''
|
||||
if SUITS_SORTED[suit_map[j]][1] then
|
||||
local view_deck = CardArea('''
|
||||
line_prepend = ''
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/UI_definitions.lua"
|
||||
pattern = "local suit_map = {'Spades', 'Hearts', 'Clubs', 'Diamonds'}"
|
||||
position = "after"
|
||||
payload = "local SUITS_SORTED = Cartomancer.tablecopy(SUITS)"
|
||||
match_indent = true
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/UI_definitions.lua"
|
||||
pattern = "{card_limit = #SUITS[suit_map[j]], type = 'title', view_deck = true, highlight_limit = 0, card_w = G.CARD_W*0.7, draw_layers = {'card'}})"
|
||||
position = "at"
|
||||
payload = "{card_limit = #SUITS_SORTED[suit_map[j]], type = 'title', view_deck = true, highlight_limit = 0, card_w = G.CARD_W*0.7, draw_layers = {'card'}})"
|
||||
match_indent = true
|
||||
|
||||
# Add unique count
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/UI_definitions.lua"
|
||||
pattern = '''modded and {n=G.UIT.R, config={align = "cm"}, nodes={'''
|
||||
position = "before"
|
||||
payload = "not unplayed_only and Cartomancer.add_unique_count() or nil,"
|
||||
match_indent = true
|
||||
|
||||
# Overwrite cards copy and display code
|
||||
|
||||
[[patches]]
|
||||
[patches.regex]
|
||||
target = "functions/UI_definitions.lua"
|
||||
pattern = '''
|
||||
(?<indent>[\t ]*)for i = 1\, \#SUITS\[suit_map\[j\]\] do
|
||||
[\t ]* if SUITS\[suit_map\[j\]\]\[i\] then
|
||||
[\t ]* local greyed\, _scale = nil\, 0\.7
|
||||
[\t ]* if unplayed_only and not \(\(SUITS\[suit_map\[j\]\]\[i\]\.area and SUITS\[suit_map\[j\]\]\[i\]\.area == G\.deck\) or SUITS\[suit_map\[j\]\]\[i\]\.ability\.wheel_flipped\) then
|
||||
[\t ]* greyed = true
|
||||
[\t ]* end
|
||||
[\t ]* local copy = copy_card\(SUITS\[suit_map\[j\]\]\[i\]\,nil\, _scale\)
|
||||
[\t ]* copy\.greyed = greyed
|
||||
[\t ]* copy\.T\.x = view_deck\.T\.x \+ view_deck\.T\.w\/2
|
||||
[\t ]* copy\.T\.y = view_deck\.T\.y
|
||||
[\t ]*
|
||||
[\t ]* copy:hard_set_T\(\)
|
||||
[\t ]* view_deck:emplace\(copy\)
|
||||
[\t ]* end
|
||||
[\t ]*end'''
|
||||
position = "at"
|
||||
payload = '''
|
||||
for i = 1, #SUITS_SORTED[suit_map[j]] do
|
||||
local card_string = SUITS_SORTED[suit_map[j]][i]
|
||||
local card = SUITS[suit_map[j]][card_string]
|
||||
|
||||
card.T.x = view_deck.T.x + view_deck.T.w/2
|
||||
card.T.y = view_deck.T.y
|
||||
card:create_quantity_display()
|
||||
|
||||
card:hard_set_T()
|
||||
view_deck:emplace(card)
|
||||
|
||||
end
|
||||
'''
|
||||
line_prepend = '$indent'
|
14
Cartomancer-v.4.10-fix-fix/lovely/tags.toml
Normal file
|
@ -0,0 +1,14 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 69
|
||||
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = 'game.lua'
|
||||
pattern = '''G.FUNCS.blind_chip_UI_scale(G.hand_text_area.blind_chips)'''
|
||||
position = 'before'
|
||||
payload = '''
|
||||
Cartomancer.update_tags_visibility()'''
|
||||
match_indent = true
|
90
Cartomancer-v.4.10-fix-fix/lovely/vanilla-ui.toml
Normal file
|
@ -0,0 +1,90 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 69
|
||||
|
||||
|
||||
# Localization
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "game.lua"
|
||||
pattern = "boot_timer('prep stage', 'splash prep',1)"
|
||||
position = "before"
|
||||
payload = "Cartomancer.load_mod_file('internal/localization.lua', 'localization')"
|
||||
match_indent = true
|
||||
|
||||
# Add tab button to settings menu
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/UI_definitions.lua"
|
||||
match_indent = true
|
||||
position = "before"
|
||||
pattern = '''local t = create_UIBox_generic_options({back_func = 'options',contents = {create_tabs('''
|
||||
payload = '''
|
||||
local settings_icon = Cartomancer.add_settings_icon()
|
||||
if settings_icon then
|
||||
tabs[#tabs+1] = {
|
||||
colour = G.C.MONEY,
|
||||
custom_button = {settings_icon},
|
||||
tab_definition_function = Cartomancer.config_tab,
|
||||
tab_definition_function_args = ''
|
||||
}
|
||||
end
|
||||
'''
|
||||
|
||||
# Use custom button
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/UI_definitions.lua"
|
||||
match_indent = true
|
||||
position = "at"
|
||||
pattern = '''but_UI_label'''
|
||||
payload = '''
|
||||
args.ref_table and args.ref_table.custom_button or but_UI_label -- Cartomancer'''
|
||||
|
||||
# Use custom color
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/UI_definitions.lua"
|
||||
match_indent = true
|
||||
position = "at"
|
||||
pattern = '''colour = args.colour,'''
|
||||
payload = '''
|
||||
colour = args.ref_table and args.ref_table.colour or args.colour, -- Cartomancer'''
|
||||
|
||||
|
||||
# From steamodded for vertical tabs support.
|
||||
# Fix UIElement.config.chosen being overriden if choice=true is set
|
||||
# UIElement:click()
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "engine/ui.lua"
|
||||
match_indent = true
|
||||
position = "after"
|
||||
pattern = "if self.config.choice then"
|
||||
payload = " local chosen_temp = self.config.chosen"
|
||||
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "engine/ui.lua"
|
||||
match_indent = true
|
||||
position = "at"
|
||||
pattern = "self.config.chosen = true"
|
||||
payload = "self.config.chosen = chosen_temp or true"
|
||||
|
||||
# Add dynamic label support to UIBox_button
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/UI_definitions.lua"
|
||||
match_indent = true
|
||||
position = "before"
|
||||
pattern = "for k, v in ipairs(args.label) do"
|
||||
payload = '''
|
||||
if args.dynamic_label then
|
||||
but_UI_label = {}
|
||||
|
||||
table.insert(but_UI_label, {n=G.UIT.R, config={align = "cm", padding = 0, minw = args.minw, maxw = args.maxw}, nodes={
|
||||
{n=G.UIT.T, config={ref_table = args.dynamic_label, ref_value = 'text', scale = args.scale, colour = args.text_colour, shadow = args.shadow, focus_args = button_pip and args.focus_args or nil, func = button_pip,}}
|
||||
}})
|
||||
end
|
||||
'''
|
58
Cartomancer-v.4.10-fix-fix/lovely/zoom-jokers.toml
Normal file
|
@ -0,0 +1,58 @@
|
|||
[manifest]
|
||||
version = "1.0.0"
|
||||
dump_lua = true
|
||||
priority = 69
|
||||
|
||||
# Replace joker sorting. Needs better mod compat
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "cardarea.lua"
|
||||
pattern = "if self.config.type == 'joker' or self.config.type == 'title_2' then"
|
||||
position = "at"
|
||||
payload = '''
|
||||
if self == G.jokers and G.jokers.cart_jokers_expanded then
|
||||
local align_cards = Cartomancer.expand_G_jokers()
|
||||
|
||||
-- This should work fine without cryptid. But because cryptid's patch is priority=0, it has to be this way
|
||||
if not G.GAME.modifiers.cry_conveyor then
|
||||
table.sort(self.cards, function (a, b) return a.T.x + a.T.w/2 - 100*(a.pinned and a.sort_id or 0) < b.T.x + b.T.w/2 - 100*(b.pinned and b.sort_id or 0) end)
|
||||
end
|
||||
|
||||
if align_cards then
|
||||
G.jokers:hard_set_cards()
|
||||
end
|
||||
elseif self.config.type == 'joker' or self.config.type == 'title_2' then'''
|
||||
match_indent = true
|
||||
|
||||
# Hide all cards that are off-screen
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "card.lua"
|
||||
pattern = "if not self.states.visible then return end"
|
||||
position = "after"
|
||||
payload = '''
|
||||
if self.VT.x < -3 or self.VT.x > G.TILE_W + 2.5 then return end'''
|
||||
match_indent = true
|
||||
|
||||
# Add slider ID
|
||||
[[patches]]
|
||||
[patches.pattern]
|
||||
target = "functions/UI_definitions.lua"
|
||||
pattern = '''{n=G.UIT.B, config={w=startval,h=args.h, r = 0.1, colour = args.colour, ref_table = args, refresh_movement = true}},'''
|
||||
position = "at"
|
||||
payload = '''
|
||||
{n=G.UIT.B, config={id = args.id, w=startval,h=args.h, r = 0.1, colour = args.colour, ref_table = args, refresh_movement = true}},
|
||||
'''
|
||||
match_indent = true
|
||||
|
||||
# Hide slider value
|
||||
[[patches]]
|
||||
[patches.regex]
|
||||
target = "functions/UI_definitions.lua"
|
||||
pattern = '''
|
||||
(?<content>\{n=G\.UIT\.C\, config=\{align = "cm"\, minh = args\.h\,r = 0\.1\, minw = 0\.8\, colour = args\.colour\,shadow = true\}\, nodes=\{
|
||||
[\t ]*\{n=G\.UIT\.T\, config=\{ref_table = args\, ref_value = 'text'\, scale = args\.text_scale\, colour = G\.C\.UI\.TEXT_LIGHT\, decimal_places = args\.decimal_places\}\}
|
||||
[\t ]*\}\})\,'''
|
||||
position = "at"
|
||||
payload = '''
|
||||
not args.hide_val and $content or nil'''
|
22
Cartomancer-v.4.10-fix-fix/mod.lua
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- STEAMODDED HEADER
|
||||
--- MOD_NAME: Cartomancer
|
||||
--- MOD_ID: cartomancer
|
||||
--- MOD_AUTHOR: [stupxd aka stupid]
|
||||
--- MOD_DESCRIPTION: Quality of life features and optimizations
|
||||
--- PRIORITY: 69
|
||||
--- BADGE_COLOR: FFD700
|
||||
--- DISPLAY_NAME: Cartomancer
|
||||
--- VERSION: 4.10
|
||||
|
||||
----------------------------------------------
|
||||
------------MOD CODE -------------------------
|
||||
|
||||
if not SMODS.current_mod then
|
||||
return
|
||||
end
|
||||
|
||||
SMODS.current_mod.config_tab = Cartomancer.config_tab
|
||||
SMODS.current_mod.save_mod_config = Cartomancer.save_config
|
||||
|
||||
----------------------------------------------
|
||||
------------MOD CODE END----------------------
|
3360
Cryptid/Cryptid.lua
Normal file
450
Cryptid/Items/Achievements.lua
Normal file
|
@ -0,0 +1,450 @@
|
|||
local achievement_atlas = {
|
||||
object_type = "Atlas",
|
||||
key = "achievements",
|
||||
path = "cry_achievements.png",
|
||||
px = 66,
|
||||
py = 66,
|
||||
}
|
||||
|
||||
local break_infinity = {
|
||||
object_type = "Achievement",
|
||||
key = "break_infinity",
|
||||
order = 1,
|
||||
bypass_all_unlocked = true,
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "chip_score" and to_big(args.chips) >= to_big(2) ^ to_big(1024) then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local used_crash = {
|
||||
object_type = "Achievement",
|
||||
key = "used_crash",
|
||||
order = 2,
|
||||
bypass_all_unlocked = true,
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if
|
||||
args.type == "ach_cry_used_crash"
|
||||
and G.PROFILES[G.SETTINGS.profile].consumeable_usage["c_cry_crash"]
|
||||
and G.PROFILES[G.SETTINGS.profile].consumeable_usage["c_cry_crash"].count > 0
|
||||
then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local haxxor = {
|
||||
object_type = "Achievement",
|
||||
key = "haxxor",
|
||||
order = 3,
|
||||
bypass_all_unlocked = true,
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "cheat_used" then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local googol_play_pass = {
|
||||
object_type = "Achievement",
|
||||
key = "googol_play_pass",
|
||||
order = 4,
|
||||
bypass_all_unlocked = true,
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "googol_play_rigged" then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local bullet_hell = {
|
||||
object_type = "Achievement",
|
||||
key = "bullet_hell",
|
||||
order = 5,
|
||||
bypass_all_unlocked = true,
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "modify_jokers" then
|
||||
local ap_joker_count = 0
|
||||
|
||||
if G.jokers then
|
||||
for i = 1, #G.jokers.cards do
|
||||
if G.jokers.cards[i].config.center.key == "j_cry_apjoker" then
|
||||
ap_joker_count = ap_joker_count + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ap_joker_count >= 15 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local what_have_you_done = {
|
||||
object_type = "Achievement",
|
||||
key = "what_have_you_done",
|
||||
order = 6,
|
||||
bypass_all_unlocked = true,
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "what_have_you_done" then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local cryptid_the_cryptid = {
|
||||
object_type = "Achievement",
|
||||
key = "cryptid_the_cryptid",
|
||||
order = 7,
|
||||
bypass_all_unlocked = true,
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "cryptid_the_cryptid" then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local niw_uoy = {
|
||||
object_type = "Achievement",
|
||||
key = "niw_uoy",
|
||||
order = 8,
|
||||
bypass_all_unlocked = true,
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "ante_up" and args.ante <= -8 then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local jokes_on_you = {
|
||||
object_type = "Achievement",
|
||||
key = "jokes_on_you",
|
||||
order = 9,
|
||||
bypass_all_unlocked = true,
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args) --NOTE: Might be buggy due to G.GAME saving
|
||||
if args.type == "win" and G.GAME.cry_ach_conditions.the_jokes_on_you_triggered == true then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local now_the_fun_begins = {
|
||||
object_type = "Achievement",
|
||||
key = "now_the_fun_begins",
|
||||
order = 10,
|
||||
bypass_all_unlocked = true,
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "modify_jokers" then
|
||||
for i = 1, #G.jokers.cards do
|
||||
if G.jokers.cards[i].config.center.key == "j_cry_canvas" then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local blurred_blurred_joker = {
|
||||
object_type = "Achievement",
|
||||
key = "blurred_blurred_joker",
|
||||
order = 11,
|
||||
bypass_all_unlocked = true,
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "modify_jokers" then
|
||||
for i = 1, #G.jokers.cards do
|
||||
if
|
||||
G.jokers.cards[i].config.center.key == "j_cry_blurred"
|
||||
and (G.jokers.cards[i].edition and G.jokers.cards[i].edition.cry_blur)
|
||||
then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local exodia = {
|
||||
object_type = "Achievement",
|
||||
key = "exodia",
|
||||
order = 12,
|
||||
bypass_all_unlocked = true,
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "modify_jokers" then
|
||||
local exotic_count = 0
|
||||
|
||||
for i = 1, #G.jokers.cards do
|
||||
if G.jokers.cards[i].config.center.rarity == "cry_exotic" then
|
||||
exotic_count = exotic_count + 1
|
||||
end
|
||||
end
|
||||
|
||||
if exotic_count >= 5 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local freak_house = {
|
||||
object_type = "Achievement",
|
||||
key = "freak_house",
|
||||
order = 13,
|
||||
bypass_all_unlocked = true,
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args) -- NOTE: I hate doing checks like this. Unscuff later
|
||||
if args.type == "hand" then
|
||||
-- Do you have Nice
|
||||
local has_nice
|
||||
for i = 1, #G.jokers.cards do
|
||||
if G.jokers.cards[i].config.center.key == "j_cry_nice" then
|
||||
has_nice = true
|
||||
end
|
||||
end
|
||||
|
||||
--Is it a hearts flush house
|
||||
local total_6s = 0
|
||||
local total_9s = 0
|
||||
local total_hearts = 0
|
||||
for k, v in ipairs(args.scoring_hand) do
|
||||
if v:is_suit("Hearts", nil, true) then
|
||||
total_hearts = total_hearts + 1
|
||||
end
|
||||
if v:get_id() == 6 then
|
||||
total_6s = total_6s + 1
|
||||
elseif v:get_id() == 9 then
|
||||
total_9s = total_9s + 1
|
||||
end
|
||||
end
|
||||
|
||||
if
|
||||
has_nice
|
||||
and ((total_6s == 3 and total_9s == 2) or (total_6s == 2 and total_9s == 3))
|
||||
and total_hearts == 5
|
||||
and args.disp_text == "Flush House"
|
||||
then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local ult_full_skip = {
|
||||
object_type = "Achievement",
|
||||
key = "ult_full_skip",
|
||||
order = 14,
|
||||
bypass_all_unlocked = true,
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "win" and G.GAME.round == 1 then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local patience_virtue = {
|
||||
object_type = "Achievement",
|
||||
key = "patience_virtue",
|
||||
order = 15,
|
||||
bypass_all_unlocked = true,
|
||||
hidden_text = true,
|
||||
pos = { x = 2, y = 0 },
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "round_win" then
|
||||
if
|
||||
G.GAME.blind.config.blind.key == "bl_cry_lavender_loop"
|
||||
and G.GAME.cry_ach_conditions.patience_virtue_earnable == true
|
||||
then
|
||||
return true
|
||||
end
|
||||
if G.GAME.cry_ach_conditions.patience_virtue_earnable then
|
||||
G.GAME.cry_ach_conditions.patience_virtue_earnable = nil
|
||||
end
|
||||
if G.GAME.cry_ach_conditions.patience_virtue_timer then
|
||||
G.GAME.cry_ach_conditions.patience_virtue_timer = nil
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local pull_request = {
|
||||
object_type = "Achievement",
|
||||
key = "pull_request",
|
||||
order = 16,
|
||||
bypass_all_unlocked = true,
|
||||
hidden_text = true,
|
||||
pos = { x = 2, y = 0 },
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "pr_unlock" then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local ace_through_crash = {
|
||||
object_type = "Achievement",
|
||||
key = "ace_in_crash",
|
||||
order = 17,
|
||||
bypass_all_unlocked = true,
|
||||
pos = { x = 2, y = 0 },
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "ace_in_crash" then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local home_realtor = {
|
||||
object_type = "Achievement",
|
||||
key = "home_realtor",
|
||||
order = 18,
|
||||
bypass_all_unlocked = true,
|
||||
hidden_text = true,
|
||||
pos = { x = 2, y = 0 },
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
--todo: check for doe/antimatter sleeves
|
||||
if args.type == "home_realtor" then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local traffic_jam = {
|
||||
object_type = "Achievement",
|
||||
key = "traffic_jam",
|
||||
order = 19,
|
||||
bypass_all_unlocked = true,
|
||||
hidden_text = true,
|
||||
pos = { x = 2, y = 0 },
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "win_challenge" or args.type == "win_challenge_startup" then
|
||||
local rush_hours_beaten = 0
|
||||
|
||||
if G.PROFILES[G.SETTINGS.profile].challenge_progress.completed["c_cry_rush_hour"] then
|
||||
rush_hours_beaten = rush_hours_beaten + 1
|
||||
end
|
||||
if G.PROFILES[G.SETTINGS.profile].challenge_progress.completed["c_cry_rush_hour_ii"] then
|
||||
rush_hours_beaten = rush_hours_beaten + 1
|
||||
end
|
||||
if G.PROFILES[G.SETTINGS.profile].challenge_progress.completed["c_cry_rush_hour_iii"] then
|
||||
rush_hours_beaten = rush_hours_beaten + 1
|
||||
end
|
||||
|
||||
if rush_hours_beaten == 3 then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
local perfectly_balanced = {
|
||||
object_type = "Achievement",
|
||||
key = "perfectly_balanced",
|
||||
order = 20,
|
||||
bypass_all_unlocked = true,
|
||||
hidden_text = true,
|
||||
pos = { x = 2, y = 0 },
|
||||
atlas = "cry_achievements",
|
||||
--reset_on_startup = true,
|
||||
unlock_condition = function(self, args)
|
||||
if args.type == "win_stake" or args.type == "win_stake_startup" then
|
||||
if
|
||||
(G.GAME.selected_back.effect.center.key == "b_cry_very_fair" and G.GAME.stake == 32)
|
||||
or get_deck_win_stake("b_cry_very_fair") == 32
|
||||
then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
-- TODO: Add new Achievements.
|
||||
-- Current Ideas (Normal):
|
||||
-- Cry: Win a run with only Sob and Obelisk
|
||||
-- Overtuned: Have any Glitched item give either 100x or 0.01x its original values
|
||||
-- Current Ideas (Platinum):
|
||||
|
||||
-- Implemented (Normal)
|
||||
-- Break Infinity: Score more than 1.57e308 in one hand
|
||||
-- H4xx0r: Use a cheat code
|
||||
-- We Told You Not To: Use ://CRASH
|
||||
-- Googol Play Pass: Rig a Googol Play Card
|
||||
-- Bullet Hell: Have 15 copies of AP Joker
|
||||
-- !niW uoY: Reach Ante -8
|
||||
-- Now the Fun Begins: Obtain Canvas
|
||||
-- Exodia: Have 5 Exotic Jokers
|
||||
-- WHAT HAVE YOU DONE: Delete or Sacrifice an Exotic Joker
|
||||
-- Joke's on You, Pal!: Trigger The Joke's effect on Ante 1 and win the run
|
||||
-- Freak House: Play a Flush House consisting of 6s and 9s of Hearts whilst possessing Nice
|
||||
-- Ultimate Full Skip: Win in 1 round
|
||||
-- Legally Blind: Obtain a Blurred Blurred Joker
|
||||
-- Cryptid the Cryptid: Use Cryptid on Cryptid
|
||||
-- Implemented (Platinum)
|
||||
-- Patience is a Virtue: Wait out Lavender Loop for 2 minutes before playing first hand and beat it
|
||||
-- Pull Request: Have ://COMMIT spawn the same Joker that it destroyed
|
||||
-- Pocket ACE: Only unlockable through using ACE to unlock
|
||||
-- Home Realtor: Activate Happy House before Ante 8 (without DoE/Antimatter)
|
||||
-- Traffic Jam: Win all Rush Hour challenges
|
||||
-- Perfectly Balanced: Beat Very Fair Deck on Ascendant Stake
|
||||
|
||||
local achievement_objects = {
|
||||
achievement_atlas,
|
||||
break_infinity,
|
||||
bullet_hell,
|
||||
cryptid_the_cryptid,
|
||||
now_the_fun_begins,
|
||||
blurred_blurred_joker,
|
||||
exodia,
|
||||
what_have_you_done,
|
||||
used_crash,
|
||||
haxxor,
|
||||
googol_play_pass,
|
||||
pull_request,
|
||||
niw_uoy,
|
||||
jokes_on_you,
|
||||
freak_house,
|
||||
ult_full_skip,
|
||||
patience_virtue,
|
||||
ace_through_crash,
|
||||
home_realtor,
|
||||
traffic_jam,
|
||||
perfectly_balanced,
|
||||
}
|
||||
return { name = "Achievements", init = function() end, items = achievement_objects }
|
214
Cryptid/Items/Antimatter.lua
Normal file
|
@ -0,0 +1,214 @@
|
|||
local blank = {
|
||||
object_type = "Back",
|
||||
name = "cry-Blank",
|
||||
key = "blank",
|
||||
order = 75,
|
||||
pos = { x = 1, y = 0 },
|
||||
atlas = "blank",
|
||||
}
|
||||
local blank_sprite = {
|
||||
object_type = "Atlas",
|
||||
key = "blank",
|
||||
path = "atlasdeck.png",
|
||||
px = 71,
|
||||
py = 95,
|
||||
}
|
||||
local antimatter = {
|
||||
object_type = "Back",
|
||||
name = "cry-Antimatter",
|
||||
order = 76,
|
||||
key = "antimatter",
|
||||
config = {
|
||||
cry_antimatter = true,
|
||||
discards = 1, --Red Deck: 1
|
||||
hands = 1, --Blue Deck: 1
|
||||
dollars = 10, --Yellow Deck
|
||||
extra_hand_bonus = 2,
|
||||
extra_discard_bonus = 1, --Green Deck
|
||||
joker_slot = 1, --Black Deck: 1
|
||||
vouchers = {
|
||||
"v_crystal_ball",
|
||||
"v_telescope",
|
||||
"v_tarot_merchant",
|
||||
"v_planet_merchant",
|
||||
"v_overstock_norm",
|
||||
"v_overstock_plus",
|
||||
}, --Vouchers from all decks
|
||||
consumables = { "c_fool", "c_fool", "c_hex" }, --Consumables from all decks
|
||||
spectral_rate = 2, --Ghost Deck
|
||||
remove_faces = true, --Abandoned Deck
|
||||
hand_size = 3, --Painted Deck & Infinite deck
|
||||
randomize_rank_suit = true, --Erratic Deck
|
||||
cry_equilibrium = true, --Deck of Equilibrium
|
||||
cry_misprint_min = 1,
|
||||
cry_misprint_max = 10, --Misprint Deck
|
||||
cry_highlight_limit = 1e20, --Infinite Deck
|
||||
cry_wormhole = true,
|
||||
cry_negative_rate = 20, --Wormhole Deck
|
||||
cry_redeemed = true, --Redeemed Deck
|
||||
cry_crit_rate = 0.25, --Critical Deck
|
||||
cry_encoded = true, --Encoded Deck
|
||||
cry_legendary = true,
|
||||
cry_legendary_rate = 0.2, --Legendary Deck
|
||||
cry_spooky = true, --Spooky Deck
|
||||
cry_curse_rate = 0,
|
||||
-- Enhanced Decks
|
||||
cry_force_enhancement = "random",
|
||||
cry_force_edition = "random",
|
||||
cry_force_seal = "random",
|
||||
cry_boss_blocked = { "bl_goad", "bl_window", "bl_club", "bl_head" },
|
||||
cry_forced_draw_amount = 5,
|
||||
},
|
||||
pos = { x = 2, y = 0 },
|
||||
trigger_effect = function(self, args)
|
||||
if args.context == "final_scoring_step" then
|
||||
--Critical Deck
|
||||
local crit_poll = pseudorandom(pseudoseed("cry_critical"))
|
||||
crit_poll = crit_poll / (G.GAME.probabilities.normal or 1)
|
||||
if crit_poll < self.config.cry_crit_rate then
|
||||
args.mult = args.mult ^ 2
|
||||
update_hand_text({ delay = 0 }, { mult = args.mult, chips = args.chips })
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
play_sound("talisman_emult", 1)
|
||||
attention_text({
|
||||
scale = 1.4,
|
||||
text = localize("cry_critical_hit_ex"),
|
||||
hold = 4,
|
||||
align = "cm",
|
||||
offset = { x = 0, y = -1.7 },
|
||||
major = G.play,
|
||||
})
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end
|
||||
delay(0.6)
|
||||
--Plasma Deck
|
||||
local tot = args.chips + args.mult
|
||||
args.chips = math.floor(tot / 2)
|
||||
args.mult = math.floor(tot / 2)
|
||||
update_hand_text({ delay = 0 }, { mult = args.mult, chips = args.chips })
|
||||
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
local text = localize("k_balanced")
|
||||
play_sound("gong", 0.94, 0.3)
|
||||
play_sound("gong", 0.94 * 1.5, 0.2)
|
||||
play_sound("tarot1", 1.5)
|
||||
ease_colour(G.C.UI_CHIPS, { 0.8, 0.45, 0.85, 1 })
|
||||
ease_colour(G.C.UI_MULT, { 0.8, 0.45, 0.85, 1 })
|
||||
attention_text({
|
||||
scale = 1.4,
|
||||
text = text,
|
||||
hold = 2,
|
||||
align = "cm",
|
||||
offset = { x = 0, y = -2.7 },
|
||||
major = G.play,
|
||||
})
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
blockable = false,
|
||||
blocking = false,
|
||||
delay = 4.3,
|
||||
func = function()
|
||||
ease_colour(G.C.UI_CHIPS, G.C.BLUE, 2)
|
||||
ease_colour(G.C.UI_MULT, G.C.RED, 2)
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
blockable = false,
|
||||
blocking = false,
|
||||
no_delete = true,
|
||||
delay = 6.3,
|
||||
func = function()
|
||||
G.C.UI_CHIPS[1], G.C.UI_CHIPS[2], G.C.UI_CHIPS[3], G.C.UI_CHIPS[4] =
|
||||
G.C.BLUE[1], G.C.BLUE[2], G.C.BLUE[3], G.C.BLUE[4]
|
||||
G.C.UI_MULT[1], G.C.UI_MULT[2], G.C.UI_MULT[3], G.C.UI_MULT[4] =
|
||||
G.C.RED[1], G.C.RED[2], G.C.RED[3], G.C.RED[4]
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
|
||||
delay(0.6)
|
||||
return args.chips, args.mult
|
||||
end
|
||||
--Glowing Deck & Legendary Deck
|
||||
if args.context == "eval" and G.GAME.last_blind and G.GAME.last_blind.boss then
|
||||
--Glowing Deck
|
||||
for i = 1, #G.jokers.cards do
|
||||
cry_with_deck_effects(G.jokers.cards[i], function(card)
|
||||
cry_misprintize(card, { min = 1.25, max = 1.25 }, nil, true)
|
||||
end)
|
||||
end
|
||||
--Legendary Deck
|
||||
if G.jokers then
|
||||
if #G.jokers.cards < G.jokers.config.card_limit then
|
||||
local legendary_poll = pseudorandom(pseudoseed("cry_legendary"))
|
||||
legendary_poll = legendary_poll / (G.GAME.probabilities.normal or 1)
|
||||
if legendary_poll < self.config.cry_legendary_rate then
|
||||
local card = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
|
||||
card:add_to_deck()
|
||||
card:start_materialize()
|
||||
G.jokers:emplace(card)
|
||||
return true
|
||||
else
|
||||
card_eval_status_text(
|
||||
G.jokers,
|
||||
"jokers",
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
{ message = localize("k_nope_ex"), colour = G.C.RARITY[4] }
|
||||
)
|
||||
end
|
||||
else
|
||||
card_eval_status_text(
|
||||
G.jokers,
|
||||
"jokers",
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
{ message = localize("k_no_room_ex"), colour = G.C.RARITY[4] }
|
||||
)
|
||||
end
|
||||
end
|
||||
--Anaglyph Deck
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = (function()
|
||||
add_tag(Tag('tag_double'))
|
||||
play_sound('generic1', 0.9 + math.random()*0.1, 0.8)
|
||||
play_sound('holo1', 1.2 + math.random()*0.1, 0.4)
|
||||
return true
|
||||
end)
|
||||
}))
|
||||
end
|
||||
end,
|
||||
apply = function(self)
|
||||
--Checkered Deck
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
for k, v in pairs(G.playing_cards) do
|
||||
if v.base.suit == 'Clubs' then
|
||||
v:change_suit('Spades')
|
||||
end
|
||||
if v.base.suit == 'Diamonds' then
|
||||
v:change_suit('Hearts')
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
}))
|
||||
end,
|
||||
atlas = "blank",
|
||||
}
|
||||
return {
|
||||
name = "Antimatter Deck",
|
||||
init = function() end,
|
||||
items = { blank_sprite, blank, antimatter },
|
||||
}
|
1474
Cryptid/Items/Blinds.lua
Normal file
576
Cryptid/Items/Challenges.lua
Normal file
|
@ -0,0 +1,576 @@
|
|||
local sticker_sheet = {
|
||||
object_type = "Challenge",
|
||||
key = "sticker_sheet",
|
||||
order = 9,
|
||||
rules = {
|
||||
custom = {
|
||||
{ id = "all_eternal" },
|
||||
{ id = "cry_all_perishable" },
|
||||
{ id = "cry_all_rental" },
|
||||
{ id = "cry_all_pinned" },
|
||||
{ id = "cry_all_banana" },
|
||||
{ id = "cry_eternal_perishable_compat" },
|
||||
{ id = "cry_any_stickers" },
|
||||
{ id = "cry_sticker_sheet" },
|
||||
},
|
||||
modifiers = {},
|
||||
},
|
||||
restrictions = {
|
||||
banned_cards = {},
|
||||
banned_other = {},
|
||||
},
|
||||
deck = {
|
||||
type = "Challenge Deck",
|
||||
},
|
||||
}
|
||||
local sticker_sheet_plus = {
|
||||
object_type = "Challenge",
|
||||
key = "sticker_sheet_plus",
|
||||
order = 10,
|
||||
rules = {
|
||||
custom = {
|
||||
{ id = "cry_sticker_sheet_plus" },
|
||||
{ id = "cry_eternal_perishable_compat" },
|
||||
},
|
||||
modifiers = {},
|
||||
},
|
||||
restrictions = {
|
||||
banned_cards = {},
|
||||
banned_other = {},
|
||||
},
|
||||
deck = {
|
||||
type = "Challenge Deck",
|
||||
},
|
||||
}
|
||||
local ballin = {
|
||||
object_type = "Challenge",
|
||||
key = "ballin",
|
||||
order = 1,
|
||||
rules = {
|
||||
custom = {},
|
||||
modifiers = {
|
||||
{ id = "joker_slots", value = 3 },
|
||||
},
|
||||
},
|
||||
jokers = {
|
||||
{ id = "j_cry_jimball", eternal = true },
|
||||
},
|
||||
deck = {
|
||||
type = "Challenge Deck",
|
||||
enhancement = "m_stone",
|
||||
},
|
||||
restrictions = {
|
||||
banned_cards = {
|
||||
{ id = "j_vampire" },
|
||||
{ id = "c_magician" },
|
||||
{ id = "c_empress" },
|
||||
{ id = "c_heirophant" },
|
||||
{ id = "c_lovers" },
|
||||
{ id = "c_chariot" },
|
||||
{ id = "c_justice" },
|
||||
{ id = "c_devil" },
|
||||
{ id = "c_tower" },
|
||||
{ id = "c_familiar" },
|
||||
{ id = "c_grim" },
|
||||
{ id = "c_incantation" },
|
||||
},
|
||||
banned_other = {},
|
||||
},
|
||||
}
|
||||
local rush_hour = {
|
||||
object_type = "Challenge",
|
||||
key = "rush_hour",
|
||||
order = 3,
|
||||
rules = {
|
||||
custom = {
|
||||
{ id = "cry_rush_hour" }, --this just explains the rule
|
||||
},
|
||||
modifiers = {},
|
||||
},
|
||||
deck = {
|
||||
type = "Challenge Deck",
|
||||
},
|
||||
restrictions = {
|
||||
banned_cards = {
|
||||
{ id = "j_luchador" },
|
||||
{ id = "j_chicot" },
|
||||
},
|
||||
banned_other = {},
|
||||
},
|
||||
}
|
||||
local rush_hour_ii = {
|
||||
object_type = "Challenge",
|
||||
key = "rush_hour_ii",
|
||||
order = 6,
|
||||
rules = {
|
||||
custom = {
|
||||
{ id = "cry_rush_hour" },
|
||||
{ id = "cry_rush_hour_ii" },
|
||||
{ id = "cry_no_tags" },
|
||||
},
|
||||
modifiers = {},
|
||||
},
|
||||
deck = {
|
||||
type = "Challenge Deck",
|
||||
},
|
||||
restrictions = {
|
||||
banned_cards = {
|
||||
{ id = "j_luchador" },
|
||||
{ id = "j_chicot" },
|
||||
{ id = "j_throwback" },
|
||||
{ id = "j_diet_cola" },
|
||||
{ id = "v_directors_cut" },
|
||||
{ id = "v_retcon" },
|
||||
},
|
||||
banned_other = {},
|
||||
},
|
||||
}
|
||||
|
||||
local rush_hour_iii = {
|
||||
object_type = "Challenge",
|
||||
key = "rush_hour_iii",
|
||||
order = 8,
|
||||
rules = {
|
||||
custom = {
|
||||
{ id = "cry_rush_hour" },
|
||||
{ id = "cry_rush_hour_ii" },
|
||||
{ id = "cry_rush_hour_iii" },
|
||||
{ id = "cry_no_tags" },
|
||||
},
|
||||
modifiers = {},
|
||||
},
|
||||
jokers = {
|
||||
{ id = "j_hit_the_road", eternal = true, edition = "negative" },
|
||||
},
|
||||
deck = {
|
||||
type = "Challenge Deck",
|
||||
cards = {
|
||||
{ s = "D", r = "2" },
|
||||
{ s = "D", r = "3" },
|
||||
{ s = "D", r = "4" },
|
||||
{ s = "D", r = "5" },
|
||||
{ s = "D", r = "6" },
|
||||
{ s = "D", r = "7" },
|
||||
{ s = "D", r = "8" },
|
||||
{ s = "D", r = "9" },
|
||||
{ s = "D", r = "T" },
|
||||
{ s = "D", r = "J" },
|
||||
{ s = "D", r = "J" },
|
||||
{ s = "D", r = "Q" },
|
||||
{ s = "D", r = "K" },
|
||||
{ s = "D", r = "A" },
|
||||
{ s = "C", r = "2" },
|
||||
{ s = "C", r = "3" },
|
||||
{ s = "C", r = "4" },
|
||||
{ s = "C", r = "5" },
|
||||
{ s = "C", r = "6" },
|
||||
{ s = "C", r = "7" },
|
||||
{ s = "C", r = "8" },
|
||||
{ s = "C", r = "9" },
|
||||
{ s = "C", r = "T" },
|
||||
{ s = "C", r = "J" },
|
||||
{ s = "C", r = "J" },
|
||||
{ s = "C", r = "Q" },
|
||||
{ s = "C", r = "K" },
|
||||
{ s = "C", r = "A" },
|
||||
{ s = "H", r = "2" },
|
||||
{ s = "H", r = "3" },
|
||||
{ s = "H", r = "4" },
|
||||
{ s = "H", r = "5" },
|
||||
{ s = "H", r = "6" },
|
||||
{ s = "H", r = "7" },
|
||||
{ s = "H", r = "8" },
|
||||
{ s = "H", r = "9" },
|
||||
{ s = "H", r = "T" },
|
||||
{ s = "H", r = "J" },
|
||||
{ s = "H", r = "J" },
|
||||
{ s = "H", r = "Q" },
|
||||
{ s = "H", r = "K" },
|
||||
{ s = "H", r = "A" },
|
||||
{ s = "S", r = "2" },
|
||||
{ s = "S", r = "3" },
|
||||
{ s = "S", r = "4" },
|
||||
{ s = "S", r = "5" },
|
||||
{ s = "S", r = "6" },
|
||||
{ s = "S", r = "7" },
|
||||
{ s = "S", r = "8" },
|
||||
{ s = "S", r = "9" },
|
||||
{ s = "S", r = "T" },
|
||||
{ s = "S", r = "J" },
|
||||
{ s = "S", r = "J" },
|
||||
{ s = "S", r = "Q" },
|
||||
{ s = "S", r = "K" },
|
||||
{ s = "S", r = "A" },
|
||||
},
|
||||
},
|
||||
restrictions = {
|
||||
banned_cards = {
|
||||
{ id = "j_luchador" },
|
||||
{ id = "j_chicot" },
|
||||
{ id = "j_throwback" },
|
||||
{ id = "j_diet_cola" },
|
||||
{ id = "v_directors_cut" },
|
||||
{ id = "v_retcon" },
|
||||
},
|
||||
banned_other = {},
|
||||
},
|
||||
}
|
||||
local boss_rush = {
|
||||
object_type = "Challenge",
|
||||
key = "boss_rush",
|
||||
order = 2,
|
||||
rules = {
|
||||
custom = {
|
||||
{ id = "cry_rush_hour_ii" },
|
||||
{ id = "cry_no_tags" },
|
||||
},
|
||||
modifiers = {},
|
||||
},
|
||||
jokers = {
|
||||
{ id = "j_cry_apjoker", eternal = true },
|
||||
},
|
||||
deck = {
|
||||
type = "Challenge Deck",
|
||||
},
|
||||
restrictions = {
|
||||
banned_cards = {
|
||||
{ id = "j_luchador" },
|
||||
{ id = "j_chicot" },
|
||||
{ id = "j_throwback" },
|
||||
{ id = "j_diet_cola" },
|
||||
{ id = "v_directors_cut" },
|
||||
{ id = "v_retcon" },
|
||||
},
|
||||
banned_other = {},
|
||||
},
|
||||
}
|
||||
local rng = {
|
||||
object_type = "Challenge",
|
||||
key = "rng",
|
||||
order = 7,
|
||||
rules = {
|
||||
custom = {
|
||||
{ id = "all_rnj" },
|
||||
},
|
||||
modifiers = {},
|
||||
},
|
||||
jokers = {},
|
||||
deck = {
|
||||
type = "Challenge Deck",
|
||||
},
|
||||
restrictions = {
|
||||
banned_tags = {
|
||||
{ id = "tag_uncommon" },
|
||||
{ id = "tag_rare" },
|
||||
{ id = "tag_top_up" },
|
||||
},
|
||||
banned_cards = {},
|
||||
banned_other = {},
|
||||
},
|
||||
}
|
||||
local dagger_war = {
|
||||
object_type = "Challenge",
|
||||
key = "dagger_war",
|
||||
order = 4,
|
||||
rules = {
|
||||
custom = {},
|
||||
modifiers = {},
|
||||
},
|
||||
restrictions = {
|
||||
banned_cards = {},
|
||||
banned_other = {},
|
||||
},
|
||||
jokers = {
|
||||
{ id = "j_cry_cryptidmoment", edition = "negative" },
|
||||
{ id = "j_cry_cryptidmoment", edition = "negative" },
|
||||
{ id = "j_gift", edition = "negative" },
|
||||
{ id = "j_gift", edition = "negative" },
|
||||
{ id = "j_ceremonial", eternal = true },
|
||||
{ id = "j_cry_unjust_dagger", eternal = true },
|
||||
{ id = "j_cry_monkey_dagger", eternal = true },
|
||||
{ id = "j_cry_pirate_dagger", eternal = true },
|
||||
},
|
||||
deck = {
|
||||
type = "Challenge Deck",
|
||||
},
|
||||
}
|
||||
local onlycard = {
|
||||
object_type = "Challenge",
|
||||
key = "onlycard",
|
||||
order = 5,
|
||||
rules = {
|
||||
custom = {},
|
||||
modifiers = {
|
||||
{id = 'dollars', value = 10},
|
||||
},
|
||||
},
|
||||
restrictions = {
|
||||
banned_tags = {
|
||||
{ id = "tag_charm" },
|
||||
{ id = "tag_meteor" },
|
||||
{ id = "tag_buffoon" },
|
||||
{ id = "tag_ethereal" }
|
||||
},
|
||||
banned_cards = {
|
||||
{ id = "j_marble" },
|
||||
{ id = "j_dna" },
|
||||
{ id = "j_certificate" },
|
||||
{ id = "c_familiar" },
|
||||
{ id = "c_grim" },
|
||||
{ id = "c_incantation" },
|
||||
{ id = "c_cryptid" },
|
||||
{id = 'p_celestial_normal_1', ids = {
|
||||
'p_celestial_normal_1','p_celestial_normal_2',
|
||||
'p_celestial_normal_3','p_celestial_normal_4',
|
||||
'p_celestial_jumbo_1','p_celestial_jumbo_2',
|
||||
'p_celestial_mega_1','p_celestial_mega_2',}
|
||||
},
|
||||
{id = 'p_arcana_normal_1', ids = {
|
||||
'p_arcana_normal_1','p_arcana_normal_2',
|
||||
'p_arcana_normal_3','p_arcana_normal_4',
|
||||
'p_arcana_jumbo_1','p_arcana_jumbo_2',
|
||||
'p_arcana_mega_1','p_arcana_mega_2',}
|
||||
},
|
||||
{id = 'p_spectral_normal_1', ids = {
|
||||
'p_spectral_normal_1','p_spectral_normal_2',
|
||||
'p_spectral_jumbo_1','p_spectral_mega_1',}
|
||||
},
|
||||
{id = 'p_buffoon_normal_1', ids = {
|
||||
'p_buffoon_normal_1','p_buffoon_normal_2',
|
||||
'p_buffoon_jumbo_1','p_buffoon_mega_1',}
|
||||
},
|
||||
},
|
||||
banned_other = {
|
||||
{ id = 'bl_house', type = 'blind' },
|
||||
},
|
||||
},
|
||||
jokers = {
|
||||
{ id = "j_popcorn" },
|
||||
},
|
||||
deck = {
|
||||
type = "Challenge Deck",
|
||||
cards = {
|
||||
{ s = "C", r = "A", g='Blue' },
|
||||
},
|
||||
},
|
||||
}
|
||||
local joker_poker = {
|
||||
object_type = "Challenge",
|
||||
key = "joker_poker",
|
||||
order = 11,
|
||||
rules = {
|
||||
custom = {
|
||||
{ id = "cry_no_tags" },
|
||||
{ id = "cry_no_rerolls" },
|
||||
{ id = "cry_no_vouchers" },
|
||||
{ id = "cry_no_boosters" },
|
||||
{ id = "cry_no_consumables" },
|
||||
},
|
||||
modifiers = {
|
||||
{id = "consumable_slots", value = 0},
|
||||
{id = "discards", value = 0}
|
||||
},
|
||||
},
|
||||
deck = {
|
||||
type = "Challenge Deck",
|
||||
},
|
||||
restrictions = {
|
||||
banned_cards = {
|
||||
{id = "j_banner"},
|
||||
{id = "j_8_ball"},
|
||||
{id = "j_chaos"},
|
||||
{id = "j_delayed_grat"},
|
||||
{id = "j_sixth_sense"},
|
||||
{id = "j_faceless"},
|
||||
{id = "j_superposition"},
|
||||
{id = "j_red_card"},
|
||||
{id = "j_seance"},
|
||||
{id = "j_vagabond"},
|
||||
{id = "j_mail"},
|
||||
{id = "j_hallucination"},
|
||||
{id = "j_fortune_teller"},
|
||||
{id = "j_drunkard"},
|
||||
{id = "j_trading"},
|
||||
{id = "j_flash"},
|
||||
{id = "j_castle"},
|
||||
{id = "j_merry_andy"},
|
||||
{id = "j_hit_the_road"},
|
||||
{id = "j_satellite"},
|
||||
{id = "j_cartomancer"},
|
||||
{id = "j_astronomer"},
|
||||
{id = "j_burnt"},
|
||||
{id = "j_yorick"},
|
||||
{id = "j_perkeo"},
|
||||
{id = "j_constellation"}
|
||||
},
|
||||
banned_other = {
|
||||
{ id = 'bl_hook', type = 'blind' },
|
||||
{ id = 'bl_arm', type = 'blind' },
|
||||
{ id = 'bl_water', type = 'blind' },
|
||||
},
|
||||
},
|
||||
}
|
||||
local gfcr = G.FUNCS.can_reroll
|
||||
function G.FUNCS.can_reroll(e)
|
||||
if G.GAME.modifiers.cry_no_rerolls then
|
||||
e.config.colour = G.C.UI.BACKGROUND_INACTIVE
|
||||
e.config.button = nil
|
||||
else
|
||||
return gfcr(e)
|
||||
end
|
||||
end
|
||||
local gsr = Game.start_run
|
||||
function Game:start_run(args)
|
||||
gsr(self, args)
|
||||
if G.GAME.modifiers.cry_no_consumables then
|
||||
G.GAME.joker_rate = 1e300
|
||||
end
|
||||
end
|
||||
--Add banned cards when specific features/mods are enabled here
|
||||
--TODO other mods
|
||||
if Cryptid.enabled["Blinds"] then
|
||||
joker_poker.restrictions.banned_other[#joker_poker.restrictions.banned_other + 1] = { id = 'bl_cry_oldmanacle', type = 'blind' }
|
||||
end
|
||||
if Cryptid.enabled["Tags"] then
|
||||
onlycard.restrictions.banned_tags[#onlycard.restrictions.banned_tags + 1] = { id = "tag_cry_bundle" }
|
||||
onlycard.restrictions.banned_tags[#onlycard.restrictions.banned_tags + 1] = { id = "tag_cry_loss" }
|
||||
onlycard.restrictions.banned_tags[#onlycard.restrictions.banned_tags + 1] = { id = "tag_cry_gambler" }
|
||||
onlycard.restrictions.banned_tags[#onlycard.restrictions.banned_tags + 1] = { id = "tag_cry_empowered" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "p_cry_empowered" }
|
||||
if Cryptid.enabled["Epic Jokers"] then
|
||||
rng.restrictions.banned_tags[#rng.restrictions.banned_tags + 1] = { id = "tag_cry_epic" }
|
||||
end
|
||||
end
|
||||
if Cryptid.enabled["Misc."] then
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_cry_eclipse" }
|
||||
rng.restrictions.banned_cards[#rng.restrictions.banned_cards + 1] = {id = 'p_cry_meme_1', ids = {'p_cry_meme_1','p_cry_meme_two','p_cry_meme_three'}}
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = {id = 'p_cry_meme_1', ids = {'p_cry_meme_1','p_cry_meme_two','p_cry_meme_three'}}
|
||||
end
|
||||
if Cryptid.enabled["Misc. Jokers"] then
|
||||
rush_hour_ii.restrictions.banned_cards[#rush_hour_ii.restrictions.banned_cards + 1] = { id = "j_cry_pickle" }
|
||||
rush_hour_iii.restrictions.banned_cards[#rush_hour_iii.restrictions.banned_cards + 1] = { id = "j_cry_pickle" }
|
||||
boss_rush.restrictions.banned_cards[#boss_rush.restrictions.banned_cards + 1] = { id = "j_cry_pickle" }
|
||||
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_booster" }
|
||||
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_wheelhope" }
|
||||
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_hunger" }
|
||||
end
|
||||
if Cryptid.enabled["M Jokers"] then
|
||||
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_sacrifice" }
|
||||
if Cryptid.enabled["Epic Jokers"] then
|
||||
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_doodlem" }
|
||||
end
|
||||
end
|
||||
if Cryptid.enabled["Epic Jokers"] then
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "j_cry_multjoker" }
|
||||
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_multjoker" }
|
||||
end
|
||||
if Cryptid.enabled["Exotic Jokers"] then
|
||||
rng.restrictions.banned_cards[#rng.restrictions.banned_cards + 1] = { id = "j_cry_equilib" }
|
||||
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_stella_mortis" }
|
||||
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_crustulum" }
|
||||
end
|
||||
if Cryptid.enabled["Code Cards"] then
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_cry_class" }
|
||||
rng.restrictions.banned_cards[#rng.restrictions.banned_cards + 1] = { id = "c_cry_delete" }
|
||||
onlycard.restrictions.banned_tags[#onlycard.restrictions.banned_tags + 1] = { id = "tag_cry_console" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = {id = 'p_cry_code_normal_1', ids = {'p_cry_code_normal_1','p_cry_code_normal_2','p_cry_code_jumbo_1','p_cry_code_mega_1',}}
|
||||
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_cut" }
|
||||
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_CodeJoker" }
|
||||
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_copypaste" }
|
||||
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_blender" }
|
||||
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_python" }
|
||||
end
|
||||
if Cryptid.enabled["Spectrals"] then
|
||||
sticker_sheet.restrictions.banned_cards[#sticker_sheet.restrictions.banned_cards + 1] = { id = "c_cry_lock" }
|
||||
sticker_sheet_plus.restrictions.banned_cards[#sticker_sheet_plus.restrictions.banned_cards + 1] = { id = "c_cry_lock" }
|
||||
dagger_war.restrictions.banned_cards[#dagger_war.restrictions.banned_cards + 1] = { id = "c_cry_lock" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_cry_replica" }
|
||||
end
|
||||
if Cryptid.enabled["Vouchers"] then
|
||||
rush_hour_ii.restrictions.banned_cards[#rush_hour_ii.restrictions.banned_cards + 1] = { id = "v_cry_copies" }
|
||||
rush_hour_iii.restrictions.banned_cards[#rush_hour_iii.restrictions.banned_cards + 1] = { id = "v_cry_copies" }
|
||||
boss_rush.restrictions.banned_cards[#boss_rush.restrictions.banned_cards + 1] = { id = "v_cry_copies" }
|
||||
rush_hour_ii.restrictions.banned_cards[#rush_hour_ii.restrictions.banned_cards + 1] = { id = "v_cry_tag_printer" }
|
||||
rush_hour_iii.restrictions.banned_cards[#rush_hour_iii.restrictions.banned_cards + 1] = { id = "v_cry_tag_printer" }
|
||||
boss_rush.restrictions.banned_cards[#boss_rush.restrictions.banned_cards + 1] = { id = "v_cry_tag_printer" }
|
||||
rush_hour_ii.restrictions.banned_cards[#rush_hour_ii.restrictions.banned_cards + 1] = { id = "v_cry_clone_machine" }
|
||||
rush_hour_iii.restrictions.banned_cards[#rush_hour_iii.restrictions.banned_cards + 1] = { id = "v_cry_clone_machine" }
|
||||
boss_rush.restrictions.banned_cards[#boss_rush.restrictions.banned_cards + 1] = { id = "v_cry_clone_machine" }
|
||||
end
|
||||
if (SMODS.Mods["jen"] or {}).can_load then
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_chance" }
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_token_tag_cry_bundle" }
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_reverse_magician" }
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_reverse_empress" }
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_reverse_heirophant" }
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_reverse_lovers" }
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_reverse_chariot" }
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_reverse_justice" }
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_reverse_devil" }
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_reverse_tower" }
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_reverse_star" }
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_reverse_moon" }
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_reverse_sun" }
|
||||
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_reverse_world" }
|
||||
rng.restrictions.banned_cards[#rng.restrictions.banned_cards + 1] = { id = "c_jen_jokerinatarot" }
|
||||
rng.restrictions.banned_cards[#rng.restrictions.banned_cards + 1] = { id = "c_jen_token_tag_uncommon" }
|
||||
rng.restrictions.banned_cards[#rng.restrictions.banned_cards + 1] = { id = "c_jen_token_tag_rare" }
|
||||
rng.restrictions.banned_cards[#rng.restrictions.banned_cards + 1] = { id = "c_jen_token_tag_top_up" }
|
||||
rng.restrictions.banned_cards[#rng.restrictions.banned_cards + 1] = { id = "c_jen_token_tag_cry_epic" }
|
||||
rng.restrictions.banned_cards[#rng.restrictions.banned_cards + 1] = { id = "c_jen_wraith_ex" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "j_jen_shikigami" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_token_tag_charm" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_token_tag_meteor" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_token_tag_buffoon" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_token_tag_ethereal" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_token_tag_cry_bundle" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_magician" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_empress" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_heirophant" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_lovers" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_chariot" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_justice" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_devil" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_tower" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_high_priestess" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_emperor" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_death" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_star" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_moon" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_sun" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_world" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_reverse_judgement" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_mischief" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_wonder" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_familiar_ex" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_grim_ex" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_incantation_ex" }
|
||||
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_cryptid_ex" }
|
||||
end
|
||||
--end of banned cards
|
||||
local challenges = { sticker_sheet, sticker_sheet_plus, onlycard }
|
||||
if Cryptid.enabled["Misc. Jokers"] then
|
||||
challenges[#challenges + 1] = ballin
|
||||
challenges[#challenges + 1] = boss_rush
|
||||
challenges[#challenges + 1] = rng
|
||||
challenges[#challenges + 1] = dagger_war
|
||||
end
|
||||
if Cryptid.enabled["Blinds"] and Cryptid.enabled["Timer Mechanics"] then
|
||||
challenges[#challenges + 1] = rush_hour
|
||||
challenges[#challenges + 1] = rush_hour_ii
|
||||
challenges[#challenges + 1] = rush_hour_iii
|
||||
end
|
||||
if Cryptid.enabled["Misc. Decks"] then --yoinking vfd code here
|
||||
challenges[#challenges + 1] = joker_poker
|
||||
end
|
||||
|
||||
for k, v in pairs(G.P_CENTERS) do
|
||||
if v.set == "Joker" then
|
||||
if not v.perishable_compat or not v.eternal_compat then
|
||||
sticker_sheet.restrictions.banned_cards[#sticker_sheet.restrictions.banned_cards + 1] = { id = k }
|
||||
sticker_sheet_plus.restrictions.banned_cards[#sticker_sheet_plus.restrictions.banned_cards + 1] = { id = k }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return { name = "Challenges", init = function() end, items = challenges }
|
4225
Cryptid/Items/CodeCards.lua
Normal file
1995
Cryptid/Items/CryptidJokerDisplay.lua
Normal file
468
Cryptid/Items/Decks.lua
Normal file
|
@ -0,0 +1,468 @@
|
|||
local atlasdeck = {
|
||||
object_type = "Atlas",
|
||||
key = "atlasdeck",
|
||||
path = "atlasdeck.png",
|
||||
px = 71,
|
||||
py = 95,
|
||||
}
|
||||
local atlasglowing = {
|
||||
object_type = "Atlas",
|
||||
key = "glowing",
|
||||
path = "b_cry_glowing.png",
|
||||
px = 71,
|
||||
py = 95,
|
||||
}
|
||||
local very_fair = {
|
||||
object_type = "Back",
|
||||
name = "Very Fair Deck",
|
||||
key = "very_fair",
|
||||
config = { hands = -2, discards = -2, cry_no_vouchers = true },
|
||||
pos = { x = 4, y = 0 },
|
||||
order = 1,
|
||||
--[[loc_vars = function(self, info_queue, center)
|
||||
return {vars = {center.effect.config.hands, center.effect.config.discards}}
|
||||
end,--]]
|
||||
--this doesn't work, will fix later
|
||||
atlas = "atlasdeck",
|
||||
}
|
||||
|
||||
very_fair_quip = {}
|
||||
|
||||
local equilibrium = {
|
||||
object_type = "Back",
|
||||
name = "cry-Equilibrium",
|
||||
key = "equilibrium",
|
||||
order = 3,
|
||||
config = { vouchers = { "v_overstock_norm", "v_overstock_plus" }, cry_equilibrium = true },
|
||||
pos = { x = 0, y = 1 },
|
||||
atlas = "atlasdeck",
|
||||
}
|
||||
local misprint = {
|
||||
object_type = "Back",
|
||||
name = "cry-Misprint",
|
||||
key = "misprint",
|
||||
order = 4,
|
||||
config = { cry_misprint_min = 0.1, cry_misprint_max = 10 },
|
||||
pos = { x = 4, y = 2 },
|
||||
atlas = "atlasdeck",
|
||||
}
|
||||
local infinite = {
|
||||
object_type = "Back",
|
||||
name = "cry-Infinite",
|
||||
key = "infinite",
|
||||
order = 2,
|
||||
config = { cry_highlight_limit = 1e20, hand_size = 1 },
|
||||
pos = { x = 3, y = 0 },
|
||||
atlas = "atlasdeck",
|
||||
}
|
||||
local conveyor = {
|
||||
object_type = "Back",
|
||||
name = "cry-Conveyor",
|
||||
key = "conveyor",
|
||||
order = 7,
|
||||
config = { cry_conveyor = true },
|
||||
pos = { x = 1, y = 1 },
|
||||
atlas = "atlasdeck",
|
||||
}
|
||||
local CCD = {
|
||||
object_type = "Back",
|
||||
name = "cry-CCD",
|
||||
key = "CCD",
|
||||
order = 5,
|
||||
config = { cry_ccd = true },
|
||||
pos = { x = 0, y = 0 },
|
||||
atlas = "atlasdeck",
|
||||
}
|
||||
local wormhole = {
|
||||
object_type = "Back",
|
||||
name = "cry-Wormhole",
|
||||
key = "wormhole",
|
||||
order = 6,
|
||||
config = { cry_wormhole = true, cry_negative_rate = 20, joker_slot = -2 },
|
||||
pos = { x = 3, y = 4 },
|
||||
atlas = "atlasdeck",
|
||||
}
|
||||
local redeemed = {
|
||||
object_type = "Back",
|
||||
name = "cry-Redeemed",
|
||||
key = "redeemed",
|
||||
order = 8,
|
||||
config = { cry_redeemed = true },
|
||||
pos = { x = 4, y = 4 },
|
||||
atlas = "atlasdeck",
|
||||
}
|
||||
local legendary = {
|
||||
object_type = "Back",
|
||||
name = "cry-Legendary",
|
||||
key = "legendary",
|
||||
config = { cry_legendary = true, cry_legendary_rate = 0.2 },
|
||||
pos = { x = 0, y = 6 },
|
||||
atlas = "atlasdeck",
|
||||
order = 15,
|
||||
trigger_effect = function(self, args)
|
||||
if args.context == "eval" and G.GAME.last_blind and G.GAME.last_blind.boss then
|
||||
if G.jokers then
|
||||
if #G.jokers.cards < G.jokers.config.card_limit then
|
||||
local legendary_poll = pseudorandom(pseudoseed("cry_legendary"))
|
||||
legendary_poll = legendary_poll / (G.GAME.probabilities.normal or 1)
|
||||
if legendary_poll < self.config.cry_legendary_rate then
|
||||
local card = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
|
||||
card:add_to_deck()
|
||||
card:start_materialize()
|
||||
G.jokers:emplace(card)
|
||||
return true
|
||||
else
|
||||
card_eval_status_text(
|
||||
G.jokers,
|
||||
"jokers",
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
{ message = localize("k_nope_ex"), colour = G.C.RARITY[4] }
|
||||
)
|
||||
end
|
||||
else
|
||||
card_eval_status_text(
|
||||
G.jokers,
|
||||
"jokers",
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
{ message = localize("k_no_room_ex"), colour = G.C.RARITY[4] }
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
local critical = {
|
||||
object_type = "Back",
|
||||
name = "cry-Critical",
|
||||
key = "critical",
|
||||
order = 10,
|
||||
config = { cry_crit_rate = 0.25, cry_crit_miss_rate = 0.125 },
|
||||
pos = { x = 4, y = 5 },
|
||||
atlas = "atlasdeck",
|
||||
loc_vars = function(self, info_queue, center)
|
||||
return { vars = { G.GAME.probabilities.normal or 1 } }
|
||||
end,
|
||||
trigger_effect = function(self, args)
|
||||
if args.context == "final_scoring_step" then
|
||||
local crit_poll = pseudorandom(pseudoseed("cry_critical"))
|
||||
crit_poll = crit_poll / (G.GAME.probabilities.normal or 1)
|
||||
if crit_poll < self.config.cry_crit_rate then
|
||||
args.mult = args.mult ^ 2
|
||||
update_hand_text({ delay = 0 }, { mult = args.mult, chips = args.chips })
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
play_sound("talisman_emult", 1)
|
||||
attention_text({
|
||||
scale = 1.4,
|
||||
text = localize("cry_critical_hit_ex"),
|
||||
hold = 2,
|
||||
align = "cm",
|
||||
offset = { x = 0, y = -2.7 },
|
||||
major = G.play,
|
||||
})
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
elseif crit_poll < self.config.cry_crit_rate + self.config.cry_crit_miss_rate then
|
||||
args.mult = args.mult ^ 0.5
|
||||
update_hand_text({ delay = 0 }, { mult = args.mult, chips = args.chips })
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
play_sound("timpani", 1)
|
||||
attention_text({
|
||||
scale = 1.4,
|
||||
text = localize("cry_critical_miss_ex"),
|
||||
hold = 2,
|
||||
align = "cm",
|
||||
offset = { x = 0, y = -2.7 },
|
||||
major = G.play,
|
||||
})
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end
|
||||
delay(0.6)
|
||||
return args.chips, args.mult
|
||||
end
|
||||
end,
|
||||
}
|
||||
local glowing = {
|
||||
object_type = "Back",
|
||||
name = "cry-Glowing",
|
||||
key = "glowing",
|
||||
config = { cry_glowing = true },
|
||||
pos = { x = 4, y = 2 },
|
||||
order = 9,
|
||||
loc_vars = function(self, info_queue, center)
|
||||
return { vars = { " " } }
|
||||
end,
|
||||
atlas = "glowing",
|
||||
trigger_effect = function(self, args)
|
||||
if args.context == "eval" and G.GAME.last_blind and G.GAME.last_blind.boss then
|
||||
for i = 1, #G.jokers.cards do
|
||||
if G.jokers.cards[i].ability.name ~= "Ace Aequilibrium" then --Same Reason as Gemini/Multiply
|
||||
cry_with_deck_effects(G.jokers.cards[i], function(card)
|
||||
cry_misprintize(card, { min = 1.25, max = 1.25 }, nil, true)
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
local beta = {
|
||||
object_type = "Back",
|
||||
name = "cry-Beta",
|
||||
key = "beta",
|
||||
config = { cry_beta = true },
|
||||
pos = { x = 5, y = 5 },
|
||||
order = 13,
|
||||
atlas = "atlasdeck",
|
||||
}
|
||||
local bountiful = {
|
||||
object_type = "Back",
|
||||
name = "cry-Bountiful",
|
||||
key = "bountiful",
|
||||
config = { cry_forced_draw_amount = 5 },
|
||||
pos = { x = 4, y = 2 },
|
||||
order = 14,
|
||||
atlas = "placeholders",
|
||||
}
|
||||
return {
|
||||
name = "Misc. Decks",
|
||||
init = function()
|
||||
local Backapply_to_runRef = Back.apply_to_run
|
||||
function Back.apply_to_run(self)
|
||||
Backapply_to_runRef(self)
|
||||
if self.effect.config.cry_no_vouchers then
|
||||
G.GAME.modifiers.cry_no_vouchers = true
|
||||
end
|
||||
if self.effect.config.cry_equilibrium then
|
||||
G.GAME.modifiers.cry_equilibrium = true
|
||||
end
|
||||
if self.effect.config.cry_conveyor then
|
||||
G.GAME.modifiers.cry_conveyor = true
|
||||
end
|
||||
if self.effect.config.cry_misprint_min then
|
||||
G.GAME.modifiers.cry_misprint_min = self.effect.config.cry_misprint_min
|
||||
G.GAME.modifiers.cry_misprint_max = self.effect.config.cry_misprint_max
|
||||
end
|
||||
if self.effect.config.cry_highlight_limit then
|
||||
G.GAME.modifiers.cry_highlight_limit = self.effect.config.cry_highlight_limit
|
||||
end
|
||||
if self.effect.config.cry_ccd then
|
||||
G.GAME.modifiers.cry_ccd = true
|
||||
end
|
||||
if self.effect.config.cry_beta then
|
||||
G.GAME.modifiers.cry_beta = true
|
||||
end
|
||||
if self.effect.config.cry_legendary then
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
if G.jokers then
|
||||
local card = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
|
||||
card:add_to_deck()
|
||||
card:start_materialize()
|
||||
G.jokers:emplace(card)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}))
|
||||
end
|
||||
if self.effect.config.cry_wormhole then
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
if G.jokers then
|
||||
local card =
|
||||
create_card("Joker", G.jokers, nil, "cry_exotic", nil, nil, nil, "cry_wormhole")
|
||||
card:add_to_deck()
|
||||
card:start_materialize()
|
||||
G.jokers:emplace(card)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}))
|
||||
end
|
||||
if self.effect.config.cry_negative_rate then
|
||||
G.GAME.modifiers.cry_negative_rate = self.effect.config.cry_negative_rate
|
||||
end
|
||||
if self.effect.config.cry_redeemed then
|
||||
G.GAME.modifiers.cry_redeemed = true
|
||||
end
|
||||
if self.effect.config.cry_forced_draw_amount then
|
||||
G.GAME.modifiers.cry_forced_draw_amount = self.effect.config.cry_forced_draw_amount
|
||||
end
|
||||
end
|
||||
--equilibrium deck patches
|
||||
local gcp = get_current_pool
|
||||
function get_current_pool(t, r, l, a, override_equilibrium_effect)
|
||||
if
|
||||
G.GAME.modifiers.cry_equilibrium
|
||||
and not override_equilibrium_effect
|
||||
and (a == "sho" or t == "Voucher" or t == "Booster")
|
||||
then
|
||||
if
|
||||
t ~= "Enhanced"
|
||||
and t ~= "Edition"
|
||||
and t ~= "Back"
|
||||
and t ~= "Tag"
|
||||
and t ~= "Seal"
|
||||
and t ~= "Stake"
|
||||
then
|
||||
if not P_CRY_ITEMS then
|
||||
P_CRY_ITEMS = {}
|
||||
local valid_pools = { "Joker", "Consumeables", "Voucher", "Booster" }
|
||||
for _, id in ipairs(valid_pools) do
|
||||
for k, v in pairs(G.P_CENTER_POOLS[id]) do
|
||||
if v.unlocked == true and not center_no(v, "doe", k) then
|
||||
P_CRY_ITEMS[#P_CRY_ITEMS + 1] = v.key
|
||||
end
|
||||
end
|
||||
end
|
||||
for k, v in pairs(G.P_CARDS) do
|
||||
if v.unlocked == true and not center_no(v, "doe", k) then
|
||||
P_CRY_ITEMS[#P_CRY_ITEMS + 1] = v.key
|
||||
end
|
||||
end
|
||||
end
|
||||
return P_CRY_ITEMS, "cry_equilibrium" .. G.GAME.round_resets.ante
|
||||
end
|
||||
end
|
||||
return gcp(t, r, l, a)
|
||||
end
|
||||
local gp = get_pack
|
||||
function get_pack(k, t)
|
||||
if G.GAME.modifiers.cry_equilibrium then
|
||||
if not P_CRY_ITEMS then
|
||||
P_CRY_ITEMS = {}
|
||||
local valid_pools = { "Joker", "Consumeables", "Voucher", "Booster" }
|
||||
for _, id in ipairs(valid_pools) do
|
||||
for k, v in pairs(G.P_CENTER_POOLS[id]) do
|
||||
if not center_no(v, "doe", k) then
|
||||
P_CRY_ITEMS[#P_CRY_ITEMS + 1] = v.key
|
||||
end
|
||||
end
|
||||
end
|
||||
for k, v in pairs(G.P_CARDS) do
|
||||
if not center_no(v, "doe", k) then
|
||||
P_CRY_ITEMS[#P_CRY_ITEMS + 1] = v.key
|
||||
end
|
||||
end
|
||||
end
|
||||
return G.P_CENTERS[pseudorandom_element(
|
||||
P_CRY_ITEMS,
|
||||
pseudoseed("cry_equipackbrium" .. G.GAME.round_resets.ante)
|
||||
)]
|
||||
end
|
||||
return gp(k, t)
|
||||
end
|
||||
--wormhole deck patches
|
||||
SMODS.Edition:take_ownership("negative", {
|
||||
get_weight = function(self)
|
||||
return self.weight * (G.GAME.modifiers.cry_negative_rate or 1)
|
||||
end,
|
||||
}, true)
|
||||
--redeemed deck patches
|
||||
local cr = Card.redeem
|
||||
function Card:redeem()
|
||||
cr(self)
|
||||
if G.GAME.modifiers.cry_redeemed then
|
||||
if
|
||||
#G.play.cards == 0
|
||||
and (not G.redeemed_vouchers_during_hand or #G.redeemed_vouchers_during_hand.cards == 0)
|
||||
then
|
||||
G.cry_redeemed_buffer = {}
|
||||
end
|
||||
for k, v in pairs(G.P_CENTER_POOLS["Voucher"]) do
|
||||
if v.requires and not G.GAME.used_vouchers[v] then
|
||||
for _, vv in pairs(v.requires) do
|
||||
if vv == self.config.center.key then
|
||||
--redeem extra voucher code based on Betmma's Vouchers
|
||||
local area
|
||||
if G.STATE == G.STATES.HAND_PLAYED then
|
||||
if not G.redeemed_vouchers_during_hand then
|
||||
G.redeemed_vouchers_during_hand = CardArea(
|
||||
G.play.T.x,
|
||||
G.play.T.y,
|
||||
G.play.T.w,
|
||||
G.play.T.h,
|
||||
{ type = "play", card_limit = 5 }
|
||||
)
|
||||
end
|
||||
area = G.redeemed_vouchers_during_hand
|
||||
else
|
||||
area = G.play
|
||||
end
|
||||
if not G.cry_redeemed_buffer[v.key]
|
||||
and v.unlocked then
|
||||
local card = create_card("Voucher", area, nil, nil, nil, nil, v.key)
|
||||
G.cry_redeemed_buffer[v.key] = true
|
||||
card:start_materialize()
|
||||
area:emplace(card)
|
||||
card.cost = 0
|
||||
card.shop_voucher = false
|
||||
local current_round_voucher = G.GAME.current_round.voucher
|
||||
card:redeem()
|
||||
G.GAME.current_round.voucher = current_round_voucher
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0,
|
||||
func = function()
|
||||
card:start_dissolve()
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
--glowing deck patches
|
||||
local upd = Game.update
|
||||
cry_glowing_dt = 0
|
||||
function Game:update(dt)
|
||||
upd(self, dt)
|
||||
cry_glowing_dt = cry_glowing_dt + dt
|
||||
if G.P_CENTERS and G.P_CENTERS.b_cry_glowing and cry_glowing_dt > 0.1 then
|
||||
cry_glowing_dt = 0
|
||||
local obj = G.P_CENTERS.b_cry_glowing
|
||||
if obj.pos.x == 1 and obj.pos.y == 4 then
|
||||
obj.pos.x = 0
|
||||
obj.pos.y = 0
|
||||
elseif obj.pos.x < 4 then
|
||||
obj.pos.x = obj.pos.x + 1
|
||||
elseif obj.pos.y < 6 then
|
||||
obj.pos.x = 0
|
||||
obj.pos.y = obj.pos.y + 1
|
||||
end
|
||||
end
|
||||
for k, v in pairs(G.I.CARD) do
|
||||
if v.children.back and v.children.back.atlas.name == "cry_glowing" then
|
||||
v.children.back:set_sprite_pos(G.P_CENTERS.b_cry_glowing.pos or G.P_CENTERS["b_red"].pos)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
items = {
|
||||
atlasdeck,
|
||||
very_fair,
|
||||
equilibrium,
|
||||
misprint,
|
||||
infinite,
|
||||
conveyor,
|
||||
CCD,
|
||||
wormhole,
|
||||
redeemed,
|
||||
legendary,
|
||||
critical,
|
||||
atlasglowing,
|
||||
glowing,
|
||||
beta,
|
||||
bountiful,
|
||||
},
|
||||
}
|
484
Cryptid/Items/Enhanced.lua
Normal file
|
@ -0,0 +1,484 @@
|
|||
-- Enhanced has to be loaded near-last because of Jolly edition
|
||||
-- Not localized for now - will be rewritten later
|
||||
|
||||
local atlasenhanced = {
|
||||
object_type = "Atlas",
|
||||
key = "atlasenhanced",
|
||||
path = "atlasdeck.png",
|
||||
px = 71,
|
||||
py = 95,
|
||||
}
|
||||
|
||||
packs_to_add = { atlasenhanced }
|
||||
|
||||
local typed_decks = {
|
||||
-- {'mod_prefix', 'Type', 'Name of Deck', 'Name of Object', 'Object Key', 'Shader Name', 'Atlas', 'posX', 'posY', 'Flavour Text', 'Add Price Increase'},
|
||||
-- eg. 'cry_' for Edition, Leave nil to construct Usually matches Leave nil to use All three of these are used Small subtext underneath If true, editions
|
||||
-- Cryptid cards Enhancement, automatically from name object key as name for custom deck backs main text affect the price of
|
||||
-- Leave empty Seal, object name Used instead for Should be nil for Leave nil to use default cards in shop
|
||||
-- for vanilla Sticker, banned boss blind non-shader objects fallback
|
||||
-- Suit on Suit decks
|
||||
-- For stickers ONLY,
|
||||
-- prefix must be included
|
||||
-- if you use one
|
||||
--
|
||||
-- Vanilla
|
||||
{ "", "Enhancement", "The Hierophant's Deck", "Bonus", "bonus", nil, "atlasenhanced", 3, 3, "" },
|
||||
{ "", "Enhancement", "The Empress' Deck", "Mult", "mult", nil, "atlasenhanced", 2, 3, "" },
|
||||
{ "", "Enhancement", "The Lovers' Deck", "Wild", "wild", nil, "atlasenhanced", 5, 3, "" },
|
||||
{ "", "Enhancement", "Deck of Justice", "Glass", "glass", nil, "atlasenhanced", 4, 3, "" },
|
||||
{ "", "Enhancement", "The Chariot's Deck", "Steel", "steel", nil, nil, 6, 1, "" },
|
||||
{ "", "Enhancement", "Stoner's Deck", "Stone", "stone", nil, nil, 5, 0, "" },
|
||||
{ "", "Enhancement", "The Devil's Deck", "Gold", "gold", nil, nil, 6, 0, "" },
|
||||
{ "", "Enhancement", "The Magician's Deck", "Lucky", "lucky", nil, nil, 4, 1, "" },
|
||||
|
||||
{ "", "Edition", "Deck of Chips", "Foil", "foil", nil, nil, 0, 2, "" },
|
||||
{ "", "Edition", "Deck of Mult", "Holographic", "holo", nil, nil, 0, 0, "" },
|
||||
{ "", "Edition", "Deck of XMult", "Polychrome", "polychrome", nil, nil, 5, 2, "" },
|
||||
{ "", "Edition", nil, "Negative", "negative", nil, nil, 5, 2, "" },
|
||||
|
||||
{ "", "Seal", "Talisman Deck", "Gold", "Gold", nil, nil, 1, 2, "" },
|
||||
{ "", "Seal", "Déja Vu Deck", "Red", "Red", nil, nil, 0, 0, "" },
|
||||
{ "", "Seal", "Trance Deck", "Blue", "Blue", nil, "atlasenhanced", 2, 2, "" },
|
||||
{ "", "Seal", "Medium Deck", "Purple", "Purple", nil, "atlasenhanced", 1, 2, "" },
|
||||
|
||||
{ "", "Sticker", nil, "Eternal", "eternal", nil, "atlasenhanced", 5, 2, "" },
|
||||
{ "", "Sticker", nil, "Perishable", "perishable", nil, "atlasenhanced", 0, 3, "" },
|
||||
{ "", "Sticker", nil, "Rental", "rental", nil, "atlasenhanced", 1, 3, "" },
|
||||
{ "", "Sticker", nil, "Pinned", "pinned", nil, "atlasenhanced", 0, 5, "" },
|
||||
|
||||
{ "", "Suit", "Deck of the Stars", "Diamonds", "window", nil, "atlasenhanced", 2, 1, "" },
|
||||
{ "", "Suit", "Deck of the Sun", "Hearts", "head", nil, "atlasenhanced", 3, 1, "" },
|
||||
{ "", "Suit", "Deck of the World", "Spades", "goad", nil, "atlasenhanced", 4, 1, "" },
|
||||
{ "", "Suit", "Deck of the Moon", "Clubs", "club", nil, "atlasenhanced", 5, 1, "" },
|
||||
|
||||
-- Cryptid
|
||||
-- todo: work with mod config better here
|
||||
|
||||
{ "cry", "Enhancement", "The Eclipse's Deck", "Echo", "echo", nil, "atlasenhanced", 1, 5, "" },
|
||||
|
||||
{ "cry", "Edition", nil, "Fragile", "glass", nil, nil, 5, 2, "" },
|
||||
{ "cry", "Edition", nil, "Golden", "gold", nil, nil, 5, 2, "" },
|
||||
{ "cry", "Edition", nil, "Noisy", "noisy", nil, nil, 5, 2, "" },
|
||||
{ "cry", "Edition", nil, "Astral", "astral", nil, nil, 5, 2, "" },
|
||||
{ "cry", "Edition", nil, "Blurred", "blur", nil, nil, 0, 0, "" },
|
||||
{ "cry", "Edition", nil, "Mosaic", "mosaic", nil, nil, 5, 2, "" },
|
||||
{ "cry", "Edition", nil, "Oversaturated", "oversat", nil, nil, 5, 2, "" },
|
||||
{
|
||||
"cry",
|
||||
"Edition",
|
||||
nil,
|
||||
"Glitched",
|
||||
"glitched",
|
||||
nil,
|
||||
nil,
|
||||
5,
|
||||
2,
|
||||
"Wait, isn't this just Misprint Deck?",
|
||||
},
|
||||
|
||||
{ "cry", "Seal", "Typhoon Deck", "Azure", "azure", nil, nil, 0, 2, "" },
|
||||
|
||||
{ "cry", "Sticker", nil, "Banana", "banana", nil, "atlasenhanced", 5, 4, "" },
|
||||
}
|
||||
|
||||
if Cryptid.enabled["M Jokers"] then -- Crashes the game if M jokers are disabled if we don't add this separately
|
||||
table.insert(typed_decks, 31, { "cry", "Edition", "Meck", "Jolly", "m", nil, nil, 5, 2, "" })
|
||||
end
|
||||
|
||||
for i = 1, #typed_decks do
|
||||
local deck = typed_decks[i]
|
||||
|
||||
local shader = nil
|
||||
if deck[6] then
|
||||
shader = deck[1] .. "_" .. deck[6]
|
||||
if deck.no_prefix then
|
||||
shader = deck[6]
|
||||
end
|
||||
end
|
||||
|
||||
local deck_name = deck[3]
|
||||
if not deck_name then
|
||||
deck_name = deck[4] .. " Deck"
|
||||
end
|
||||
|
||||
local deck_internal_name = ""
|
||||
if deck[1] == "cry" then -- don't register eg. 'cry-cry-Typhoon Deck'
|
||||
deck_internal_name = "cry-" .. deck_name
|
||||
else -- eg. 'cry-jen-Blood Deck'
|
||||
deck_internal_name = "cry-" .. deck[1] .. "-" .. deck_name
|
||||
end
|
||||
|
||||
local deck_key = ""
|
||||
if deck[1] == "cry" then
|
||||
deck_key = "cry" .. (deck[5] or deck[4]) .. "_deck"
|
||||
else
|
||||
deck_key = "cry" .. deck[1] .. "-" .. (deck[5] or deck[4]) .. "_deck"
|
||||
end
|
||||
|
||||
local object_key = ""
|
||||
if deck[1] == "" or deck.no_prefix then -- vanilla doesn't have a prefix, don't add the _
|
||||
object_key = deck[5] or deck[4]
|
||||
else
|
||||
object_key = deck[1] .. "_" .. (deck[5] or deck[4])
|
||||
end
|
||||
|
||||
local suit_key = ""
|
||||
if deck[1] == "" or deck.no_prefix then
|
||||
suit_key = deck[4]
|
||||
else
|
||||
suit_key = deck[1] .. "_" .. deck[4]
|
||||
end
|
||||
|
||||
if deck[2] == "Edition" then
|
||||
local obj = {
|
||||
object_type = "Back",
|
||||
name = deck_internal_name,
|
||||
key = deck_key,
|
||||
config = { cry_force_edition = object_key, cry_force_edition_shader = shader },
|
||||
pos = { x = deck[8], y = deck[9] },
|
||||
loc_txt = {
|
||||
name = deck_name,
|
||||
text = {
|
||||
"All cards are {C:dark_edition,T:" .. object_key .. "}" .. deck[4] .. " Cards{}",
|
||||
"Cards cannot change editions",
|
||||
"{s:0.8,C:inactive}" .. deck[10],
|
||||
},
|
||||
},
|
||||
}
|
||||
if deck[7] then
|
||||
obj.atlas = deck[7]
|
||||
if string.find(deck[7], "_") then
|
||||
obj.prefix_config = { atlas = false }
|
||||
end
|
||||
end
|
||||
if not deck[11] then
|
||||
obj.config.cry_no_edition_price = true
|
||||
end
|
||||
packs_to_add[#packs_to_add + 1] = obj
|
||||
elseif deck[2] == "Enhancement" then
|
||||
local obj = {
|
||||
object_type = "Back",
|
||||
name = deck_internal_name,
|
||||
key = deck_key,
|
||||
config = { cry_force_enhancement = "m_" .. object_key },
|
||||
pos = { x = deck[8], y = deck[9] },
|
||||
loc_txt = {
|
||||
name = deck_name,
|
||||
text = {
|
||||
"All {C:attention}playing cards{}",
|
||||
"are {C:attention,T:m_" .. object_key .. "}" .. deck[4] .. " Cards{}",
|
||||
"Cards cannot change enhancements",
|
||||
"{s:0.8,C:inactive}" .. deck[10],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if deck[7] then
|
||||
obj.atlas = deck[7]
|
||||
if string.find(deck[7], "_") then
|
||||
obj.prefix_config = { atlas = false }
|
||||
end
|
||||
end
|
||||
packs_to_add[#packs_to_add + 1] = obj
|
||||
elseif deck[2] == "Seal" then
|
||||
local obj = {
|
||||
object_type = "Back",
|
||||
name = deck_internal_name,
|
||||
key = deck_key,
|
||||
config = { cry_force_seal = object_key },
|
||||
pos = { x = deck[8], y = deck[9] },
|
||||
loc_txt = {
|
||||
name = deck_name,
|
||||
text = {
|
||||
"All cards have a {C:dark_edition}" .. deck[4] .. " Seal{}",
|
||||
"Cards cannot change seals",
|
||||
"{s:0.8,C:inactive}" .. deck[10],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if deck[7] then
|
||||
obj.atlas = deck[7]
|
||||
if string.find(deck[7], "_") then
|
||||
obj.prefix_config = { atlas = false }
|
||||
end
|
||||
end
|
||||
packs_to_add[#packs_to_add + 1] = obj
|
||||
elseif deck[2] == "Sticker" then
|
||||
local obj = {
|
||||
object_type = "Back",
|
||||
name = deck_internal_name,
|
||||
key = deck_key,
|
||||
config = { cry_force_sticker = deck[5] }, -- stickers DON'T use object_key for SOME reason
|
||||
pos = { x = deck[8], y = deck[9] },
|
||||
loc_txt = {
|
||||
name = deck_name,
|
||||
text = {
|
||||
"All cards are {C:attention}" .. deck[4] .. "{}",
|
||||
"{s:0.8,C:inactive}" .. deck[10],
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if deck[7] then
|
||||
obj.atlas = deck[7]
|
||||
if string.find(deck[7], "_") then
|
||||
obj.prefix_config = { atlas = false }
|
||||
end
|
||||
end
|
||||
packs_to_add[#packs_to_add + 1] = obj
|
||||
elseif deck[2] == "Suit" then
|
||||
local obj = {
|
||||
object_type = "Back",
|
||||
name = deck_internal_name,
|
||||
key = deck_key,
|
||||
config = { cry_force_suit = suit_key, cry_boss_blocked = deck[5] and { "bl_" .. object_key } },
|
||||
pos = { x = deck[8], y = deck[9] },
|
||||
loc_txt = {
|
||||
name = deck_name,
|
||||
text = {
|
||||
"All playing cards are {C:dark_edition}" .. deck[4] .. "{}",
|
||||
"and cannot change suits",
|
||||
deck[10] or "{s:0}",
|
||||
deck[5] and "{C:attention}The " .. string.upper(string.sub(deck[5], 1, 1)) .. string.sub(
|
||||
deck[5],
|
||||
2
|
||||
) .. "{} cannot appear", -- UGLY hack
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if deck[7] then
|
||||
obj.atlas = deck[7]
|
||||
if string.find(deck[7], "_") then
|
||||
obj.prefix_config = { atlas = false }
|
||||
end
|
||||
end
|
||||
packs_to_add[#packs_to_add + 1] = obj
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
name = "Enhanced Decks",
|
||||
init = function()
|
||||
local Backapply_to_runRef = Back.apply_to_run
|
||||
function Back.apply_to_run(self)
|
||||
Backapply_to_runRef(self)
|
||||
|
||||
if self.effect.config.cry_force_enhancement then
|
||||
if self.effect.config.cry_force_enhancement ~= "random" then
|
||||
G.GAME.modifiers.cry_force_enhancement = self.effect.config.cry_force_enhancement
|
||||
end
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
for c = #G.playing_cards, 1, -1 do
|
||||
if self.effect.config.cry_force_enhancement == "random" then
|
||||
local enh = {}
|
||||
for i = 1, #G.P_CENTER_POOLS.Enhanced do
|
||||
enh[#enh + 1] = G.P_CENTER_POOLS.Enhanced[i]
|
||||
end
|
||||
enh[#enh + 1] = "CCD"
|
||||
local random_enhancement = pseudorandom_element(enh, pseudoseed("cry_ant_enhancement"))
|
||||
if random_enhancement.key and G.P_CENTERS[random_enhancement.key] then
|
||||
G.playing_cards[c]:set_ability(G.P_CENTERS[random_enhancement.key])
|
||||
else
|
||||
G.playing_cards[c]:set_ability(get_random_consumable("cry_ant_ccd", nil, true))
|
||||
end
|
||||
else
|
||||
G.playing_cards[c]:set_ability(G.P_CENTERS[self.effect.config.cry_force_enhancement])
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end
|
||||
if self.effect.config.cry_force_edition then
|
||||
if self.effect.config.cry_force_edition ~= "random" then
|
||||
G.GAME.modifiers.cry_force_edition = self.effect.config.cry_force_edition
|
||||
else
|
||||
G.GAME.modifiers.cry_force_random_edition = true
|
||||
end
|
||||
for k, v in pairs(G.P_TAGS) do
|
||||
if v.config and v.config.edition then
|
||||
G.GAME.banned_keys[k] = true
|
||||
end
|
||||
end
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
for c = #G.playing_cards, 1, -1 do
|
||||
local ed_table = {}
|
||||
if self.effect.config.cry_force_edition == "random" then
|
||||
local random_edition =
|
||||
pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("cry_ant_edition"))
|
||||
while random_edition.key == "e_base" do
|
||||
random_edition =
|
||||
pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("cry_ant_edition"))
|
||||
end
|
||||
ed_table[random_edition.key:sub(3)] = true
|
||||
G.playing_cards[c]:set_edition(ed_table, true, true)
|
||||
else
|
||||
ed_table[self.effect.config.cry_force_edition] = true
|
||||
G.playing_cards[c]:set_edition(ed_table, true, true)
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end
|
||||
if self.effect.config.cry_force_seal then
|
||||
if self.effect.config.cry_force_seal ~= "random" then
|
||||
G.GAME.modifiers.cry_force_seal = self.effect.config.cry_force_seal
|
||||
end
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
for c = #G.playing_cards, 1, -1 do
|
||||
if self.effect.config.cry_force_seal == "random" then
|
||||
local random_seal =
|
||||
pseudorandom_element(G.P_CENTER_POOLS.Seal, pseudoseed("cry_ant_seal"))
|
||||
G.playing_cards[c]:set_seal(random_seal.key, true)
|
||||
else
|
||||
G.playing_cards[c]:set_seal(self.effect.config.cry_force_seal, true)
|
||||
end
|
||||
end
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end
|
||||
if self.effect.config.cry_force_sticker then
|
||||
G.GAME.modifiers.cry_force_sticker = self.effect.config.cry_force_sticker
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
for c = #G.playing_cards, 1, -1 do
|
||||
G.playing_cards[c].config.center.eternal_compat = true
|
||||
G.playing_cards[c].config.center.perishable_compat = true
|
||||
if
|
||||
SMODS.Stickers[self.effect.config.cry_force_sticker]
|
||||
and SMODS.Stickers[self.effect.config.cry_force_sticker].apply
|
||||
then
|
||||
SMODS.Stickers[self.effect.config.cry_force_sticker]:apply(G.playing_cards[c], true)
|
||||
else
|
||||
G.playing_cards[c]["set_" .. self.effect.config.cry_force_sticker](
|
||||
G.playing_cards[c],
|
||||
true
|
||||
)
|
||||
end
|
||||
end
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end
|
||||
if self.effect.config.cry_force_suit then
|
||||
G.GAME.modifiers.cry_force_suit = self.effect.config.cry_force_suit
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
for c = #G.playing_cards, 1, -1 do
|
||||
G.playing_cards[c]:change_suit(self.effect.config.cry_force_suit)
|
||||
end
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end
|
||||
if self.effect.config.cry_boss_blocked then
|
||||
for _, v in pairs(self.effect.config.cry_boss_blocked) do
|
||||
G.GAME.bosses_used[v] = 1e308
|
||||
end
|
||||
end
|
||||
if self.effect.config.cry_no_edition_price then
|
||||
G.GAME.modifiers.cry_no_edition_price = true
|
||||
end
|
||||
end
|
||||
local sa = Card.set_ability
|
||||
function Card:set_ability(center, y, z)
|
||||
--adding immutable to cards because
|
||||
-- A they are hardcoded and unaffected by misprintize but still have a description that changes because of it
|
||||
-- B so they ignore misprintize in order to keep vanilla descripton accurate (ex hack shouldn't be able to trigger more than once)
|
||||
-- C so Gemini doesn't say they are compatible when they are not
|
||||
-- D Invisible Joker
|
||||
|
||||
if center.name == "Fortune Teller"
|
||||
or center.name == "Shoot the Moon"
|
||||
or center.name == "Riff-raff"
|
||||
or center.name == "Business Card"
|
||||
or center.name == "Chaos the Clown"
|
||||
or center.name == "Dusk"
|
||||
or center.name == "Mime"
|
||||
or center.name == "Hack"
|
||||
or center.name == "Sock and Buskin"
|
||||
or center.name == "Invisible Joker"
|
||||
or center.name == "Swashbuckler"
|
||||
or center.name == "Smeared Joker"
|
||||
or center.name == "Certificate"
|
||||
or center.name == "Mr. Bones"
|
||||
or center.name == "Diet Cola"
|
||||
or center.name == "Luchador"
|
||||
or center.name == "Midas Mask"
|
||||
or center.name == "Shortcut"
|
||||
or center.name == "Seance"
|
||||
or center.name == "Superposition"
|
||||
or center.name == "Sixth Sense"
|
||||
or center.name == "DNA"
|
||||
or center.name == "Splash"
|
||||
or center.name == "Supernova"
|
||||
or center.name == "Pareidolia"
|
||||
or center.name == "Raised Fist"
|
||||
or center.name == "Marble Joker"
|
||||
or center.name == "Four Fingers"
|
||||
or center.name == "Joker Stencil"
|
||||
or center.name == "Showman"
|
||||
or center.name == "Blueprint"
|
||||
or center.name == "Oops! All 6s"
|
||||
or center.name == "Brainstorm"
|
||||
or center.name == "Cartomancer"
|
||||
or center.name == "Astronomer"
|
||||
or center.name == "Burnt Joker"
|
||||
or center.name == "Chicot"
|
||||
or center.name == "Perkeo"
|
||||
then
|
||||
self.config.center.immutable = true
|
||||
end
|
||||
|
||||
if center and center.set == "Enhanced" then
|
||||
return sa(
|
||||
self,
|
||||
(not self.no_forced_enhancement and G.GAME.modifiers.cry_force_enhancement) and G.P_CENTERS[G.GAME.modifiers.cry_force_enhancement]
|
||||
or center,
|
||||
y,
|
||||
z
|
||||
)
|
||||
else
|
||||
return sa(self, center, y, z)
|
||||
end
|
||||
end
|
||||
local se = Card.set_edition
|
||||
function Card:set_edition(edition, y, z, force)
|
||||
if not force then
|
||||
return se(self, (not self.no_forced_edition and G.GAME.modifiers.cry_force_edition) and { [G.GAME.modifiers.cry_force_edition] = true } or edition, y, z)
|
||||
end
|
||||
return se(self, edition, y, z)
|
||||
end
|
||||
local ss = Card.set_seal
|
||||
function Card:set_seal(seal, y, z)
|
||||
return ss(self, not self.no_forced_seal and G.GAME.modifiers.cry_force_seal or seal, y, z)
|
||||
end
|
||||
local cs = Card.change_suit
|
||||
function Card:change_suit(new_suit)
|
||||
return cs(self, not self.no_forced_suit and G.GAME.modifiers.cry_force_suit or new_suit)
|
||||
end
|
||||
local sc = Card.set_cost
|
||||
function Card:set_cost()
|
||||
if self.edition and G.GAME.modifiers.cry_no_edition_price then
|
||||
local m = cry_deep_copy(self.edition)
|
||||
self.edition = nil
|
||||
sc(self)
|
||||
self.edition = m
|
||||
else
|
||||
sc(self)
|
||||
end
|
||||
end
|
||||
end,
|
||||
order = 1000000,
|
||||
items = packs_to_add,
|
||||
}
|
1528
Cryptid/Items/EpicJokers.lua
Normal file
1394
Cryptid/Items/Exotic.lua
Normal file
1492
Cryptid/Items/M.lua
Normal file
1950
Cryptid/Items/Misc.lua
Normal file
6676
Cryptid/Items/MiscJokers.lua
Normal file
860
Cryptid/Items/Planets.lua
Normal file
|
@ -0,0 +1,860 @@
|
|||
local timantti = {
|
||||
object_type = "Consumable",
|
||||
set = "Planet",
|
||||
name = "cry-Timantti",
|
||||
key = "Timantti",
|
||||
pos = { x = 0, y = 2 },
|
||||
config = { hand_types = { "High Card", "Pair", "Two Pair" } },
|
||||
cost = 4,
|
||||
aurinko = true,
|
||||
atlas = "atlasnotjokers",
|
||||
order = 8,
|
||||
can_use = function(self, card)
|
||||
return true
|
||||
end,
|
||||
loc_vars = function(self, info_queue, center)
|
||||
local levelone = G.GAME.hands["High Card"].level or 1
|
||||
local leveltwo = G.GAME.hands["Pair"].level or 1
|
||||
local levelthree = G.GAME.hands["Two Pair"].level or 1
|
||||
local planetcolourone = G.C.HAND_LEVELS[math.min(levelone, 7)]
|
||||
local planetcolourtwo = G.C.HAND_LEVELS[math.min(leveltwo, 7)]
|
||||
local planetcolourthree = G.C.HAND_LEVELS[math.min(levelthree, 7)]
|
||||
if levelone == 1 or leveltwo == 1 or levelthree == 1 then --Level 1 colour is white (The background), so this sets it to black
|
||||
if levelone == 1 then
|
||||
planetcolourone = G.C.UI.TEXT_DARK
|
||||
end
|
||||
if leveltwo == 1 then
|
||||
planetcolourtwo = G.C.UI.TEXT_DARK
|
||||
end
|
||||
if levelthree == 1 then
|
||||
planetcolourthree = G.C.UI.TEXT_DARK
|
||||
end
|
||||
end
|
||||
return {
|
||||
vars = {
|
||||
localize("High Card", "poker_hands"),
|
||||
localize("Pair", "poker_hands"),
|
||||
localize("Two Pair", "poker_hands"),
|
||||
G.GAME.hands["High Card"].level,
|
||||
G.GAME.hands["Pair"].level,
|
||||
G.GAME.hands["Two Pair"].level,
|
||||
colours = { planetcolourone, planetcolourtwo, planetcolourthree },
|
||||
},
|
||||
}
|
||||
end,
|
||||
use = function(self, card, area, copier)
|
||||
suit_level_up(self, card, area, copier)
|
||||
end,
|
||||
bulk_use = function(self, card, area, copier, number)
|
||||
suit_level_up(self, card, area, copier, number)
|
||||
end,
|
||||
calculate = function(self, card, context)
|
||||
if
|
||||
G.GAME.used_vouchers.v_observatory
|
||||
and (
|
||||
context.scoring_name == "High Card"
|
||||
or context.scoring_name == "Pair"
|
||||
or context.scoring_name == "Two Pair"
|
||||
)
|
||||
then
|
||||
local value = G.P_CENTERS.v_observatory.config.extra
|
||||
return {
|
||||
message = localize({ type = "variable", key = "a_xmult", vars = { value } }),
|
||||
Xmult_mod = value,
|
||||
}
|
||||
end
|
||||
end,
|
||||
}
|
||||
local klubi = {
|
||||
object_type = "Consumable",
|
||||
set = "Planet",
|
||||
name = "cry-Klubi",
|
||||
key = "Klubi",
|
||||
pos = { x = 1, y = 2 },
|
||||
config = { hand_types = { "Three of a Kind", "Straight", "Flush" } },
|
||||
cost = 4,
|
||||
aurinko = true,
|
||||
atlas = "atlasnotjokers",
|
||||
order = 9,
|
||||
can_use = function(self, card)
|
||||
return true
|
||||
end,
|
||||
loc_vars = function(self, info_queue, center)
|
||||
local levelone = G.GAME.hands["Three of a Kind"].level or 1
|
||||
local leveltwo = G.GAME.hands["Straight"].level or 1
|
||||
local levelthree = G.GAME.hands["Flush"].level or 1
|
||||
local planetcolourone = G.C.HAND_LEVELS[math.min(levelone, 7)]
|
||||
local planetcolourtwo = G.C.HAND_LEVELS[math.min(leveltwo, 7)]
|
||||
local planetcolourthree = G.C.HAND_LEVELS[math.min(levelthree, 7)]
|
||||
if levelone == 1 or leveltwo == 1 or levelthree == 1 then --Level 1 colour is white (The background), so this sets it to black
|
||||
if levelone == 1 then
|
||||
planetcolourone = G.C.UI.TEXT_DARK
|
||||
end
|
||||
if leveltwo == 1 then
|
||||
planetcolourtwo = G.C.UI.TEXT_DARK
|
||||
end
|
||||
if levelthree == 1 then
|
||||
planetcolourthree = G.C.UI.TEXT_DARK
|
||||
end
|
||||
end
|
||||
return {
|
||||
vars = {
|
||||
localize("Three of a Kind", "poker_hands"),
|
||||
localize("Straight", "poker_hands"),
|
||||
localize("Flush", "poker_hands"),
|
||||
G.GAME.hands["Three of a Kind"].level,
|
||||
G.GAME.hands["Straight"].level,
|
||||
G.GAME.hands["Flush"].level,
|
||||
colours = { planetcolourone, planetcolourtwo, planetcolourthree },
|
||||
},
|
||||
}
|
||||
end,
|
||||
use = function(self, card, area, copier)
|
||||
suit_level_up(self, card, area, copier)
|
||||
end,
|
||||
bulk_use = function(self, card, area, copier, number)
|
||||
suit_level_up(self, card, area, copier, number)
|
||||
end,
|
||||
calculate = function(self, card, context)
|
||||
if
|
||||
G.GAME.used_vouchers.v_observatory
|
||||
and (
|
||||
context.scoring_name == "Three of a Kind"
|
||||
or context.scoring_name == "Straight"
|
||||
or context.scoring_name == "Flush"
|
||||
)
|
||||
then
|
||||
local value = G.P_CENTERS.v_observatory.config.extra
|
||||
return {
|
||||
message = localize({ type = "variable", key = "a_xmult", vars = { value } }),
|
||||
Xmult_mod = value,
|
||||
}
|
||||
end
|
||||
end,
|
||||
}
|
||||
local sydan = {
|
||||
object_type = "Consumable",
|
||||
set = "Planet",
|
||||
name = "cry-Sydan",
|
||||
key = "Sydan",
|
||||
pos = { x = 2, y = 2 },
|
||||
config = { hand_types = { "Full House", "Four of a Kind", "Straight Flush" } },
|
||||
cost = 4,
|
||||
aurinko = true,
|
||||
atlas = "atlasnotjokers",
|
||||
order = 10,
|
||||
can_use = function(self, card)
|
||||
return true
|
||||
end,
|
||||
loc_vars = function(self, info_queue, center)
|
||||
local levelone = G.GAME.hands["Full House"].level or 1
|
||||
local leveltwo = G.GAME.hands["Four of a Kind"].level or 1
|
||||
local levelthree = G.GAME.hands["Straight Flush"].level or 1
|
||||
local planetcolourone = G.C.HAND_LEVELS[math.min(levelone, 7)]
|
||||
local planetcolourtwo = G.C.HAND_LEVELS[math.min(leveltwo, 7)]
|
||||
local planetcolourthree = G.C.HAND_LEVELS[math.min(levelthree, 7)]
|
||||
if levelone == 1 or leveltwo == 1 or levelthree == 1 then --Level 1 colour is white (The background), so this sets it to black
|
||||
if levelone == 1 then
|
||||
planetcolourone = G.C.UI.TEXT_DARK
|
||||
end
|
||||
if leveltwo == 1 then
|
||||
planetcolourtwo = G.C.UI.TEXT_DARK
|
||||
end
|
||||
if levelthree == 1 then
|
||||
planetcolourthree = G.C.UI.TEXT_DARK
|
||||
end
|
||||
end
|
||||
return {
|
||||
vars = {
|
||||
localize("Full House", "poker_hands"),
|
||||
localize("Four of a Kind", "poker_hands"),
|
||||
localize("Straight Flush", "poker_hands"),
|
||||
G.GAME.hands["Full House"].level,
|
||||
G.GAME.hands["Four of a Kind"].level,
|
||||
G.GAME.hands["Straight Flush"].level,
|
||||
colours = { planetcolourone, planetcolourtwo, planetcolourthree },
|
||||
},
|
||||
}
|
||||
end,
|
||||
use = function(self, card, area, copier)
|
||||
suit_level_up(self, card, area, copier)
|
||||
end,
|
||||
bulk_use = function(self, card, area, copier, number)
|
||||
suit_level_up(self, card, area, copier, number)
|
||||
end,
|
||||
calculate = function(self, card, context)
|
||||
if
|
||||
G.GAME.used_vouchers.v_observatory
|
||||
and (
|
||||
context.scoring_name == "Full House"
|
||||
or context.scoring_name == "Four of a Kind"
|
||||
or context.scoring_name == "Straight Flush"
|
||||
)
|
||||
then
|
||||
local value = G.P_CENTERS.v_observatory.config.extra
|
||||
return {
|
||||
message = localize({ type = "variable", key = "a_xmult", vars = { value } }),
|
||||
Xmult_mod = value,
|
||||
}
|
||||
end
|
||||
end,
|
||||
}
|
||||
local lapio = {
|
||||
object_type = "Consumable",
|
||||
set = "Planet",
|
||||
name = "cry-Lapio",
|
||||
key = "Lapio",
|
||||
pos = { x = 3, y = 2 },
|
||||
config = { hand_types = { "Five of a Kind", "Flush House", "Flush Five" }, softlock = true },
|
||||
cost = 4,
|
||||
aurinko = true,
|
||||
atlas = "atlasnotjokers",
|
||||
order = 11,
|
||||
can_use = function(self, card)
|
||||
return true
|
||||
end,
|
||||
loc_vars = function(self, info_queue, center)
|
||||
local levelone = G.GAME.hands["Five of a Kind"].level or 1
|
||||
local leveltwo = G.GAME.hands["Flush House"].level or 1
|
||||
local levelthree = G.GAME.hands["Flush Five"].level or 1
|
||||
local planetcolourone = G.C.HAND_LEVELS[math.min(levelone, 7)]
|
||||
local planetcolourtwo = G.C.HAND_LEVELS[math.min(leveltwo, 7)]
|
||||
local planetcolourthree = G.C.HAND_LEVELS[math.min(levelthree, 7)]
|
||||
if levelone == 1 or leveltwo == 1 or levelthree == 1 then --Level 1 colour is white (The background), so this sets it to black
|
||||
if levelone == 1 then
|
||||
planetcolourone = G.C.UI.TEXT_DARK
|
||||
end
|
||||
if leveltwo == 1 then
|
||||
planetcolourtwo = G.C.UI.TEXT_DARK
|
||||
end
|
||||
if levelthree == 1 then
|
||||
planetcolourthree = G.C.UI.TEXT_DARK
|
||||
end
|
||||
end
|
||||
return {
|
||||
vars = {
|
||||
localize("Five of a Kind", "poker_hands"),
|
||||
localize("Flush House", "poker_hands"),
|
||||
localize("Flush Five", "poker_hands"),
|
||||
G.GAME.hands["Five of a Kind"].level,
|
||||
G.GAME.hands["Flush House"].level,
|
||||
G.GAME.hands["Flush Five"].level,
|
||||
colours = { planetcolourone, planetcolourtwo, planetcolourthree },
|
||||
},
|
||||
}
|
||||
end,
|
||||
use = function(self, card, area, copier)
|
||||
suit_level_up(self, card, area, copier)
|
||||
end,
|
||||
bulk_use = function(self, card, area, copier, number)
|
||||
suit_level_up(self, card, area, copier, number)
|
||||
end,
|
||||
calculate = function(self, card, context)
|
||||
if
|
||||
G.GAME.used_vouchers.v_observatory
|
||||
and (
|
||||
context.scoring_name == "Five of a Kind"
|
||||
or context.scoring_name == "Flush House"
|
||||
or context.scoring_name == "Flush Five"
|
||||
)
|
||||
then
|
||||
local value = G.P_CENTERS.v_observatory.config.extra
|
||||
return {
|
||||
message = localize({ type = "variable", key = "a_xmult", vars = { value } }),
|
||||
Xmult_mod = value,
|
||||
}
|
||||
end
|
||||
end,
|
||||
}
|
||||
local kaikki = {
|
||||
object_type = "Consumable",
|
||||
set = "Planet",
|
||||
name = "cry-Kaikki",
|
||||
key = "Kaikki",
|
||||
pos = { x = 3, y = 5 },
|
||||
config = { hand_types = { "cry_Bulwark", "cry_Clusterfuck", "cry_UltPair" }, softlock = true },
|
||||
cost = 4,
|
||||
aurinko = true,
|
||||
atlas = "atlasnotjokers",
|
||||
order = 12,
|
||||
can_use = function(self, card)
|
||||
return true
|
||||
end,
|
||||
loc_vars = function(self, info_queue, center)
|
||||
local levelone = G.GAME.hands["cry_Bulwark"].level or 1
|
||||
local leveltwo = G.GAME.hands["cry_Clusterfuck"].level or 1
|
||||
local levelthree = G.GAME.hands["cry_UltPair"].level or 1
|
||||
local planetcolourone = G.C.HAND_LEVELS[math.min(levelone, 7)]
|
||||
local planetcolourtwo = G.C.HAND_LEVELS[math.min(leveltwo, 7)]
|
||||
local planetcolourthree = G.C.HAND_LEVELS[math.min(levelthree, 7)]
|
||||
if levelone == 1 or leveltwo == 1 or levelthree == 1 then --Level 1 colour is white (The background), so this sets it to black
|
||||
if levelone == 1 then
|
||||
planetcolourone = G.C.UI.TEXT_DARK
|
||||
end
|
||||
if leveltwo == 1 then
|
||||
planetcolourtwo = G.C.UI.TEXT_DARK
|
||||
end
|
||||
if levelthree == 1 then
|
||||
planetcolourthree = G.C.UI.TEXT_DARK
|
||||
end
|
||||
end
|
||||
return {
|
||||
vars = {
|
||||
localize("cry_hand_bulwark"),
|
||||
localize("cry_hand_clusterfuck"),
|
||||
localize("cry_hand_ultpair"),
|
||||
G.GAME.hands["cry_Bulwark"].level,
|
||||
G.GAME.hands["cry_Clusterfuck"].level,
|
||||
G.GAME.hands["cry_UltPair"].level,
|
||||
colours = { planetcolourone, planetcolourtwo, planetcolourthree },
|
||||
},
|
||||
}
|
||||
end,
|
||||
use = function(self, card, area, copier)
|
||||
suit_level_up(self, card, area, copier)
|
||||
end,
|
||||
bulk_use = function(self, card, area, copier, number)
|
||||
suit_level_up(self, card, area, copier, number)
|
||||
end,
|
||||
calculate = function(self, card, context)
|
||||
if
|
||||
G.GAME.used_vouchers.v_observatory
|
||||
and (
|
||||
context.scoring_name == "cry_Bulwark"
|
||||
or context.scoring_name == "cry_Clusterfuck"
|
||||
or context.scoring_name == "cry_UltPair"
|
||||
)
|
||||
then
|
||||
local value = G.P_CENTERS.v_observatory.config.extra
|
||||
return {
|
||||
message = localize({ type = "variable", key = "a_xmult", vars = { value } }),
|
||||
Xmult_mod = value,
|
||||
}
|
||||
end
|
||||
end,
|
||||
}
|
||||
local planetlua = {
|
||||
object_type = "Consumable",
|
||||
set = "Planet",
|
||||
name = "cry-planetlua",
|
||||
key = "planetlua",
|
||||
config = { extra = { odds = 5 } },
|
||||
pos = { x = 4, y = 2 },
|
||||
cost = 4,
|
||||
aurinko = true,
|
||||
atlas = "atlasnotjokers",
|
||||
order = 1,
|
||||
loc_vars = function(self, info_queue, center)
|
||||
return { vars = { "" .. (G.GAME and G.GAME.probabilities.normal or 1), self.config.extra.odds } }
|
||||
end,
|
||||
can_use = function(self, card)
|
||||
return true
|
||||
end,
|
||||
use = function(self, card, area, copier)
|
||||
local used_consumable = copier or card
|
||||
if pseudorandom("planetlua") < G.GAME.probabilities.normal / card.ability.extra.odds then --Code "borrowed" from black hole
|
||||
update_hand_text(
|
||||
{ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 },
|
||||
{ handname = localize("k_all_hands"), chips = "...", mult = "...", level = "" }
|
||||
)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.2,
|
||||
func = function()
|
||||
play_sound("tarot1")
|
||||
used_consumable:juice_up(0.8, 0.5)
|
||||
G.TAROT_INTERRUPT_PULSE = true
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
update_hand_text({ delay = 0 }, { mult = "+", StatusText = true })
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.9,
|
||||
func = function()
|
||||
play_sound("tarot1")
|
||||
used_consumable:juice_up(0.8, 0.5)
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
update_hand_text({ delay = 0 }, { chips = "+", StatusText = true })
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.9,
|
||||
func = function()
|
||||
play_sound("tarot1")
|
||||
used_consumable:juice_up(0.8, 0.5)
|
||||
G.TAROT_INTERRUPT_PULSE = nil
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = "+1" })
|
||||
delay(1.3)
|
||||
for k, v in pairs(G.GAME.hands) do
|
||||
level_up_hand(used_consumable, k, true)
|
||||
end
|
||||
update_hand_text(
|
||||
{ sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
|
||||
{ mult = 0, chips = 0, handname = "", level = "" }
|
||||
)
|
||||
else
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.4,
|
||||
func = function() --"borrowed" from Wheel Of Fortune
|
||||
attention_text({
|
||||
text = localize("k_nope_ex"),
|
||||
scale = 1.3,
|
||||
hold = 1.4,
|
||||
major = used_consumable,
|
||||
backdrop_colour = G.C.SECONDARY_SET.Planet,
|
||||
align = (
|
||||
G.STATE == G.STATES.TAROT_PACK
|
||||
or G.STATE == G.STATES.SPECTRAL_PACK
|
||||
or G.STATE == G.STATES.SMODS_BOOSTER_OPENED
|
||||
)
|
||||
and "tm"
|
||||
or "cm",
|
||||
offset = {
|
||||
x = 0,
|
||||
y = (
|
||||
G.STATE == G.STATES.TAROT_PACK
|
||||
or G.STATE == G.STATES.SPECTRAL_PACK
|
||||
or G.STATE == G.STATES.SMODS_BOOSTER_OPENED
|
||||
)
|
||||
and -0.2
|
||||
or 0,
|
||||
},
|
||||
silent = true,
|
||||
})
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.06 * G.SETTINGS.GAMESPEED,
|
||||
blockable = false,
|
||||
blocking = false,
|
||||
func = function()
|
||||
play_sound("tarot2", 0.76, 0.4)
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
play_sound("tarot2", 1, 0.4)
|
||||
used_consumable:juice_up(0.3, 0.5)
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end
|
||||
end,
|
||||
bulk_use = function(self, card, area, copier, number)
|
||||
local used_consumable = copier or card
|
||||
local quota = 0
|
||||
if card.ability.cry_rigged then
|
||||
update_hand_text(
|
||||
{ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 },
|
||||
{ handname = localize("k_all_hands"), chips = "...", mult = "...", level = "" }
|
||||
)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.2,
|
||||
func = function()
|
||||
play_sound("tarot1")
|
||||
used_consumable:juice_up(0.8, 0.5)
|
||||
G.TAROT_INTERRUPT_PULSE = true
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
update_hand_text({ delay = 0 }, { mult = "+", StatusText = true })
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.9,
|
||||
func = function()
|
||||
play_sound("tarot1")
|
||||
used_consumable:juice_up(0.8, 0.5)
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
update_hand_text({ delay = 0 }, { chips = "+", StatusText = true })
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.9,
|
||||
func = function()
|
||||
play_sound("tarot1")
|
||||
used_consumable:juice_up(0.8, 0.5)
|
||||
G.TAROT_INTERRUPT_PULSE = nil
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = "+" .. number })
|
||||
delay(1.3)
|
||||
for k, v in pairs(G.GAME.hands) do
|
||||
level_up_hand(card, k, true, number)
|
||||
end
|
||||
update_hand_text(
|
||||
{ sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
|
||||
{ mult = 0, chips = 0, handname = "", level = "" }
|
||||
)
|
||||
else
|
||||
for i = 1, number do
|
||||
quota = quota
|
||||
+ (pseudorandom("planetlua") < G.GAME.probabilities.normal / card.ability.extra.odds and 1 or 0)
|
||||
end
|
||||
if quota > 0 then
|
||||
update_hand_text(
|
||||
{ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 },
|
||||
{ handname = localize("k_all_hands"), chips = "...", mult = "...", level = "" }
|
||||
)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.2,
|
||||
func = function()
|
||||
play_sound("tarot1")
|
||||
used_consumable:juice_up(0.8, 0.5)
|
||||
G.TAROT_INTERRUPT_PULSE = true
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
update_hand_text({ delay = 0 }, { mult = "+", StatusText = true })
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.9,
|
||||
func = function()
|
||||
play_sound("tarot1")
|
||||
used_consumable:juice_up(0.8, 0.5)
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
update_hand_text({ delay = 0 }, { chips = "+", StatusText = true })
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.9,
|
||||
func = function()
|
||||
play_sound("tarot1")
|
||||
used_consumable:juice_up(0.8, 0.5)
|
||||
G.TAROT_INTERRUPT_PULSE = nil
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = "+" .. quota })
|
||||
delay(1.3)
|
||||
for k, v in pairs(G.GAME.hands) do
|
||||
level_up_hand(card, k, true, quota)
|
||||
end
|
||||
update_hand_text(
|
||||
{ sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
|
||||
{ mult = 0, chips = 0, handname = "", level = "" }
|
||||
)
|
||||
else
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.4,
|
||||
func = function()
|
||||
attention_text({
|
||||
text = localize("k_nope_ex"),
|
||||
scale = 1.3,
|
||||
hold = 1.4,
|
||||
major = used_consumable,
|
||||
backdrop_colour = G.C.SECONDARY_SET.Planet,
|
||||
align = (
|
||||
G.STATE == G.STATES.TAROT_PACK
|
||||
or G.STATE == G.STATES.SPECTRAL_PACK
|
||||
or G.STATE == G.STATES.SMODS_BOOSTER_OPENED
|
||||
)
|
||||
and "tm"
|
||||
or "cm",
|
||||
offset = {
|
||||
x = 0,
|
||||
y = (
|
||||
G.STATE == G.STATES.TAROT_PACK
|
||||
or G.STATE == G.STATES.SPECTRAL_PACK
|
||||
or G.STATE == G.STATES.SMODS_BOOSTER_OPENED
|
||||
)
|
||||
and -0.2
|
||||
or 0,
|
||||
},
|
||||
silent = true,
|
||||
})
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.06 * G.SETTINGS.GAMESPEED,
|
||||
blockable = false,
|
||||
blocking = false,
|
||||
func = function()
|
||||
play_sound("tarot2", 0.76, 0.4)
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
play_sound("tarot2", 1, 0.4)
|
||||
used_consumable:juice_up(0.3, 0.5)
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end
|
||||
end
|
||||
end,
|
||||
calculate = function(self, card, context) --Observatory effect: (G.GAME.probabilities.normal) in (odds) chance for (G.P_CENTERS.v_observatory.config.extra) Mult
|
||||
if
|
||||
G.GAME.used_vouchers.v_observatory
|
||||
and (pseudorandom("nstar") < G.GAME.probabilities.normal / card.ability.extra.odds)
|
||||
then
|
||||
local value = G.P_CENTERS.v_observatory.config.extra
|
||||
return {
|
||||
message = localize({ type = "variable", key = "a_xmult", vars = { value } }),
|
||||
Xmult_mod = value,
|
||||
}
|
||||
end
|
||||
end,
|
||||
}
|
||||
local nstar = {
|
||||
object_type = "Consumable",
|
||||
set = "Planet",
|
||||
name = "cry-nstar",
|
||||
key = "nstar",
|
||||
pos = { x = 4, y = 1 },
|
||||
cost = 4,
|
||||
aurinko = true,
|
||||
atlas = "atlasnotjokers",
|
||||
order = 6,
|
||||
set_card_type_badge = function(self, card, badges)
|
||||
badges[1] = create_badge(localize("k_planet_q"), get_type_colour(self or card.config, card), nil, 1.2)
|
||||
end,
|
||||
can_use = function(self, card)
|
||||
return true
|
||||
end,
|
||||
loc_vars = function(self, info_queue, center)
|
||||
return { vars = { (G.GAME and G.GAME.neutronstarsusedinthisrun or 0) } }
|
||||
end,
|
||||
use = function(self, card, area, copier)
|
||||
local used_consumable = copier or card
|
||||
--Get amount of Neutron stars use this run or set to 0 if nil
|
||||
G.GAME.neutronstarsusedinthisrun = G.GAME.neutronstarsusedinthisrun or 0
|
||||
|
||||
--Add +1 to amount of neutron stars used this run
|
||||
G.GAME.neutronstarsusedinthisrun = G.GAME.neutronstarsusedinthisrun + 1
|
||||
local neutronhand = neutronstarrandomhand() --Random poker hand
|
||||
update_hand_text(
|
||||
{ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 },
|
||||
{
|
||||
handname = localize(neutronhand, "poker_hands"),
|
||||
chips = G.GAME.hands[neutronhand].chips,
|
||||
mult = G.GAME.hands[neutronhand].mult,
|
||||
level = G.GAME.hands[neutronhand].level,
|
||||
}
|
||||
)
|
||||
--level up once for each neutron star used this run
|
||||
level_up_hand(used_consumable, neutronhand, nil, G.GAME.neutronstarsusedinthisrun)
|
||||
update_hand_text(
|
||||
{ sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
|
||||
{ mult = 0, chips = 0, handname = "", level = "" }
|
||||
)
|
||||
end,
|
||||
bulk_use = function(self, card, area, copier, number)
|
||||
local used_consumable = copier or card
|
||||
G.GAME.neutronstarsusedinthisrun = G.GAME.neutronstarsusedinthisrun or 0
|
||||
|
||||
local handstolv = {}
|
||||
local neutronhand = "n/a"
|
||||
for i = 1, number do
|
||||
G.GAME.neutronstarsusedinthisrun = G.GAME.neutronstarsusedinthisrun + 1
|
||||
neutronhand = neutronstarrandomhand()
|
||||
handstolv[neutronhand] = (handstolv[neutronhand] or 0) + G.GAME.neutronstarsusedinthisrun
|
||||
end
|
||||
for k, v in pairs(handstolv) do
|
||||
update_hand_text(
|
||||
{ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 },
|
||||
{
|
||||
handname = localize(k, "poker_hands"),
|
||||
chips = G.GAME.hands[k].chips,
|
||||
mult = G.GAME.hands[k].mult,
|
||||
level = G.GAME.hands[k].level,
|
||||
}
|
||||
)
|
||||
card_eval_status_text(
|
||||
used_consumable,
|
||||
"extra",
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
{ message = "+" .. tostring(v), colour = G.C.BLUE }
|
||||
)
|
||||
level_up_hand(used_consumable, k, nil, v)
|
||||
end
|
||||
update_hand_text(
|
||||
{ sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
|
||||
{ mult = 0, chips = 0, handname = "", level = "" }
|
||||
)
|
||||
G.E_MANAGER:add_event(
|
||||
Event({
|
||||
trigger = "after",
|
||||
func = function()
|
||||
handstolv = nil
|
||||
return true
|
||||
end,
|
||||
})
|
||||
)
|
||||
end,
|
||||
calculate = function(self, card, context) --Observatory effect: X0.04 mult for each neutron star used this run
|
||||
if G.GAME.used_vouchers.v_observatory and G.GAME.neutronstarsusedinthisrun ~= nil then
|
||||
return {
|
||||
message = localize({
|
||||
type = "variable",
|
||||
key = "a_xmult",
|
||||
vars = { 1 + (0.04 * G.GAME.neutronstarsusedinthisrun) },
|
||||
}),
|
||||
Xmult_mod = 1 + (0.04 * G.GAME.neutronstarsusedinthisrun),
|
||||
}
|
||||
end
|
||||
end,
|
||||
}
|
||||
local sunplanet = {
|
||||
object_type = "Consumable",
|
||||
set = "Planet",
|
||||
name = "cry-sunplanet",
|
||||
key = "sunplanet",
|
||||
pos = { x = 5, y = 2 },
|
||||
cost = 4,
|
||||
aurinko = true,
|
||||
atlas = "atlasnotjokers",
|
||||
order = 7,
|
||||
set_card_type_badge = function(self, card, badges)
|
||||
badges[1] = create_badge(localize("cry_p_star"), get_type_colour(self or card.config, card), nil, 1.2)
|
||||
end,
|
||||
can_use = function(self, card)
|
||||
return true
|
||||
end,
|
||||
use = function(self, card, area, copier)
|
||||
local used_consumable = copier or card
|
||||
local sunlevel = (G.GAME.sunnumber and G.GAME.sunnumber or 0)+1
|
||||
delay(0.4)
|
||||
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize('cry_asc_hands'),chips = '...', mult = '...', level=sunlevel})
|
||||
delay(1.0)
|
||||
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2, func = function()
|
||||
play_sound('tarot1')
|
||||
ease_colour(G.C.UI_CHIPS, copy_table(G.C.GOLD), 0.1)
|
||||
ease_colour(G.C.UI_MULT, copy_table(G.C.GOLD), 0.1)
|
||||
cry_pulse_flame(0.01, sunlevel)
|
||||
used_consumable:juice_up(0.8, 0.5)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = 'after',
|
||||
blockable = false,
|
||||
blocking = false,
|
||||
delay = 1.2,
|
||||
func = (function()
|
||||
ease_colour(G.C.UI_CHIPS, G.C.BLUE, 1)
|
||||
ease_colour(G.C.UI_MULT, G.C.RED, 1)
|
||||
return true
|
||||
end)
|
||||
}))
|
||||
return true end }))
|
||||
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.9, delay = 0}, {level=sunlevel+1})
|
||||
delay(2.6)
|
||||
G.GAME.sunnumber = G.GAME.sunnumber ~= nil and G.GAME.sunnumber + 1 or 1
|
||||
update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
|
||||
end,
|
||||
bulk_use = function(self, card, area, copier, number)
|
||||
local used_consumable = copier or card
|
||||
local sunlevel = (G.GAME.sunnumber and G.GAME.sunnumber or 0)+1
|
||||
delay(0.4)
|
||||
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize('cry_asc_hands'),chips = '...', mult = '...', level=sunlevel})
|
||||
delay(1.0)
|
||||
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2, func = function()
|
||||
play_sound('tarot1')
|
||||
ease_colour(G.C.UI_CHIPS, copy_table(G.C.GOLD), 0.1)
|
||||
ease_colour(G.C.UI_MULT, copy_table(G.C.GOLD), 0.1)
|
||||
cry_pulse_flame(0.01, (sunlevel-1)+number)
|
||||
used_consumable:juice_up(0.8, 0.5)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = 'after',
|
||||
blockable = false,
|
||||
blocking = false,
|
||||
delay = 1.2,
|
||||
func = (function()
|
||||
ease_colour(G.C.UI_CHIPS, G.C.BLUE, 1)
|
||||
ease_colour(G.C.UI_MULT, G.C.RED, 1)
|
||||
return true
|
||||
end)
|
||||
}))
|
||||
return true end }))
|
||||
update_hand_text({sound = 'button', volume = 0.7, pitch = 0.9, delay = 0}, {level=sunlevel+number})
|
||||
delay(2.6)
|
||||
G.GAME.sunnumber = G.GAME.sunnumber ~= nil and G.GAME.sunnumber + number or number
|
||||
update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = '', level = ''})
|
||||
end,
|
||||
calculate = function(self, card, context) --Observatory effect: X1.5 mult if hand is an ascended hand
|
||||
if G.GAME.used_vouchers.v_observatory and G.GAME.current_round.current_hand.cry_asc_num ~= 0 then
|
||||
local value = G.P_CENTERS.v_observatory.config.extra
|
||||
return {
|
||||
message = localize({ type = "variable", key = "a_xmult", vars = { value } }),
|
||||
Xmult_mod = value,
|
||||
}
|
||||
end
|
||||
end,
|
||||
loc_vars = function(self, info_queue, center)
|
||||
local levelone = (G.GAME.sunnumber and G.GAME.sunnumber or 0)+1
|
||||
local planetcolourone = G.C.HAND_LEVELS[math.min(levelone, 7)]
|
||||
if levelone == 1 then
|
||||
planetcolourone = G.C.UI.TEXT_DARK
|
||||
end
|
||||
return {
|
||||
vars = {
|
||||
(G.GAME.sunnumber and G.GAME.sunnumber or 0)+1,
|
||||
((G.GAME.sunnumber and G.GAME.sunnumber or 0)/20) + 1.25,
|
||||
colours = { planetcolourone },
|
||||
},
|
||||
}
|
||||
end,
|
||||
in_pool = function(self)
|
||||
if G.GAME.cry_asc_played and G.GAME.cry_asc_played > 0 then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end,
|
||||
}
|
||||
function suit_level_up(center, card, area, copier, number)
|
||||
local used_consumable = copier or card
|
||||
for _, v in pairs(card.config.center.config.hand_types) do
|
||||
update_hand_text(
|
||||
{ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 },
|
||||
{
|
||||
handname = localize(v, "poker_hands"),
|
||||
chips = G.GAME.hands[v].chips,
|
||||
mult = G.GAME.hands[v].mult,
|
||||
level = G.GAME.hands[v].level,
|
||||
}
|
||||
)
|
||||
level_up_hand(used_consumable, v, nil, number)
|
||||
end
|
||||
update_hand_text(
|
||||
{ sound = "button", volume = 0.7, pitch = 1.1, delay = 0 },
|
||||
{ mult = 0, chips = 0, handname = "", level = "" }
|
||||
)
|
||||
end
|
||||
function neutronstarrandomhand(ignore, seed, allowhidden)
|
||||
--From JenLib's get_random_hand
|
||||
local chosen_hand
|
||||
ignore = ignore or {}
|
||||
seed = seed or "randomhand"
|
||||
if type(ignore) ~= "table" then
|
||||
ignore = { ignore }
|
||||
end
|
||||
while true do
|
||||
chosen_hand = pseudorandom_element(G.handlist, pseudoseed(seed))
|
||||
if G.GAME.hands[chosen_hand].visible or allowhidden then
|
||||
local safe = true
|
||||
for _, v in pairs(ignore) do
|
||||
if v == chosen_hand then
|
||||
safe = false
|
||||
end
|
||||
end
|
||||
if safe then
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
return chosen_hand
|
||||
end
|
||||
local planet_cards = { planetlua, nstar, timantti, klubi, sydan, lapio, sunplanet }
|
||||
if Cryptid.enabled["Misc."] then
|
||||
planet_cards[#planet_cards + 1] = kaikki
|
||||
end
|
||||
if not (SMODS.Mods["jen"] or {}).can_load then
|
||||
end
|
||||
return { name = "Planets", init = function() end, items = planet_cards }
|
372
Cryptid/Items/Sleeves.lua
Normal file
|
@ -0,0 +1,372 @@
|
|||
if CardSleeves then
|
||||
local atlasSleeves = SMODS.Atlas({
|
||||
object_type = "Atlas",
|
||||
key = "atlasSleeves",
|
||||
path = "atlasSleeves.png",
|
||||
px = 71,
|
||||
py = 95,
|
||||
})
|
||||
|
||||
local encodedsleeve = CardSleeves.Sleeve({
|
||||
key = "encoded_sleeve",
|
||||
name = "Encoded Sleeve",
|
||||
atlas = "atlasSleeves",
|
||||
pos = { x = 1, y = 0 },
|
||||
config = {},
|
||||
unlocked = true,
|
||||
unlock_condition = { deck = "Encoded Deck", stake = 1 },
|
||||
loc_vars = function(self)
|
||||
return { vars = {} }
|
||||
end,
|
||||
|
||||
trigger_effect = function(self, args) end,
|
||||
apply = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
if G.jokers then
|
||||
-- Adding a before spawning becuase jen banned copy_paste
|
||||
if G.P_CENTERS["j_cry_CodeJoker"] and (G.GAME.banned_keys and not G.GAME.banned_keys["j_cry_CodeJoker"]) then
|
||||
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_cry_CodeJoker")
|
||||
card:add_to_deck()
|
||||
card:start_materialize()
|
||||
G.jokers:emplace(card)
|
||||
end
|
||||
if G.P_CENTERS["j_cry_copypaste"] and (G.GAME.banned_keys and not G.GAME.banned_keys["j_cry_copypaste"]) then
|
||||
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_cry_copypaste")
|
||||
card:add_to_deck()
|
||||
card:start_materialize()
|
||||
G.jokers:emplace(card)
|
||||
end
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}))
|
||||
|
||||
--DOWNSIDE:
|
||||
|
||||
G.GAME.joker_rate = 0
|
||||
G.GAME.planet_rate = 0
|
||||
G.GAME.tarot_rate = 0
|
||||
G.GAME.code_rate = 1e100
|
||||
end,
|
||||
})
|
||||
|
||||
local equilibriumsleeve = CardSleeves.Sleeve({
|
||||
key = "equilibrium_sleeve",
|
||||
name = "Balanced Sleeve",
|
||||
atlas = "atlasSleeves",
|
||||
pos = { x = 2, y = 0 },
|
||||
config = { vouchers = { "v_overstock_norm", "v_overstock_plus" }, cry_equilibrium = true },
|
||||
unlocked = true,
|
||||
unlock_condition = { deck = "Deck of Equilibrium", stake = 1 },
|
||||
loc_vars = function(self)
|
||||
return { vars = {} }
|
||||
end,
|
||||
|
||||
trigger_effect = function(self, args) end,
|
||||
apply = function(self)
|
||||
change_shop_size(2)
|
||||
G.GAME.modifiers.cry_equilibrium = true
|
||||
end,
|
||||
})
|
||||
|
||||
local misprintsleeve = CardSleeves.Sleeve({
|
||||
key = "misprint_sleeve",
|
||||
name = "Misprinted Sleeve",
|
||||
atlas = "atlasSleeves",
|
||||
pos = { x = 3, y = 0 },
|
||||
config = { cry_misprint_min = 0.1, cry_misprint_max = 10 },
|
||||
unlocked = true,
|
||||
unlock_condition = { deck = "Misprint Deck", stake = 1 },
|
||||
trigger_effect = function(self, args)
|
||||
if args.context.create_card then
|
||||
cry_misprintize(
|
||||
args.context.card,
|
||||
{ min = 0.1 * (G.GAME.modifiers.cry_misprint_min or 1), max = 10
|
||||
* (G.GAME.modifiers.cry_misprint_max or 1) }
|
||||
)
|
||||
end
|
||||
end,
|
||||
apply = function(self)
|
||||
G.GAME.modifiers.cry_misprint_min = self.config.cry_misprint_min
|
||||
G.GAME.modifiers.cry_misprint_max = self.config.cry_misprint_max
|
||||
end,
|
||||
})
|
||||
|
||||
local infinitesleeve = CardSleeves.Sleeve({
|
||||
key = "infinite_sleeve",
|
||||
name = "Unlimited Sleeve",
|
||||
atlas = "atlasSleeves",
|
||||
pos = { x = 4, y = 0 },
|
||||
config = { cry_highlight_limit = 1e20, hand_size = 1 },
|
||||
unlocked = true,
|
||||
unlock_condition = { deck = "Infinite Deck", stake = 1 },
|
||||
loc_vars = function(self)
|
||||
return { vars = {} }
|
||||
end,
|
||||
trigger_effect = function(self, args) end,
|
||||
apply = function(self)
|
||||
G.GAME.modifiers.cry_highlight_limit = self.config.cry_highlight_limit
|
||||
end,
|
||||
})
|
||||
|
||||
local conveyorsleeve = CardSleeves.Sleeve({
|
||||
key = "conveyor_sleeve",
|
||||
name = "Conveyor Sleeve",
|
||||
atlas = "atlasSleeves",
|
||||
pos = { x = 5, y = 0 },
|
||||
config = { cry_conveyor = true },
|
||||
unlocked = true,
|
||||
unlock_condition = { deck = "Conveyor Deck", stake = 1 },
|
||||
loc_vars = function(self)
|
||||
return { vars = {} }
|
||||
end,
|
||||
trigger_effect = function(self, args) end,
|
||||
apply = function(self)
|
||||
G.GAME.modifiers.cry_conveyor = true
|
||||
end,
|
||||
})
|
||||
|
||||
local CCDsleeve = CardSleeves.Sleeve({
|
||||
key = "ccd_sleeve",
|
||||
name = "CCD Sleeve",
|
||||
atlas = "atlasSleeves",
|
||||
pos = { x = 6, y = 0 },
|
||||
config = { cry_conveyor = true },
|
||||
unlocked = true,
|
||||
unlock_condition = { deck = "CCD Deck", stake = 1 },
|
||||
loc_vars = function(self)
|
||||
return { vars = {} }
|
||||
end,
|
||||
trigger_effect = function(self, args) end,
|
||||
apply = function(self)
|
||||
G.GAME.modifiers.cry_ccd = true
|
||||
end,
|
||||
})
|
||||
|
||||
local wormholesleeve = CardSleeves.Sleeve({
|
||||
key = "wormhole_sleeve",
|
||||
name = "Wormhole Sleeve",
|
||||
atlas = "atlasSleeves",
|
||||
pos = { x = 0, y = 0 },
|
||||
config = { cry_wormhole = true, cry_negative_rate = 20, joker_slot = -2 },
|
||||
unlocked = true,
|
||||
unlock_condition = { deck = "Wormhole Deck", stake = 1 },
|
||||
loc_vars = function(self)
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
if G.jokers then
|
||||
local card =
|
||||
create_card("Joker", G.jokers, nil, "cry_exotic", nil, nil, nil, "cry_wormholesleeve")
|
||||
card:add_to_deck()
|
||||
card:start_materialize()
|
||||
G.jokers:emplace(card)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}))
|
||||
G.GAME.modifiers.cry_negative_rate = (G.GAME.modifiers.cry_negative_rate or 1)
|
||||
* self.config.cry_negative_rate
|
||||
G.GAME.starting_params.joker_slots = G.GAME.starting_params.joker_slots + self.config.joker_slot
|
||||
end,
|
||||
})
|
||||
|
||||
local redeemedsleeve = CardSleeves.Sleeve({
|
||||
key = "redeemed_sleeve",
|
||||
name = "Redeemed Sleeve",
|
||||
atlas = "atlasSleeves",
|
||||
pos = { x = 7, y = 0 },
|
||||
config = { cry_negative_rate = 20, joker_slot = -2 },
|
||||
unlocked = true,
|
||||
unlock_condition = { deck = "Redeemed Deck", stake = 1 },
|
||||
loc_vars = function(self)
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self)
|
||||
G.GAME.modifiers.cry_redeemed = true
|
||||
end,
|
||||
})
|
||||
|
||||
local criticalsleeve = CardSleeves.Sleeve({
|
||||
key = "critical_sleeve",
|
||||
name = "Critical Sleeve",
|
||||
atlas = "atlasSleeves",
|
||||
pos = { x = 8, y = 0 },
|
||||
config = { cry_crit_rate = 0.25, cry_crit_miss_rate = 0.125 },
|
||||
unlocked = true,
|
||||
unlock_condition = { deck = "Redeemed Deck", stake = 1 },
|
||||
loc_vars = function(self)
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self) end,
|
||||
trigger_effect = function(self, args)
|
||||
if args.context == "final_scoring_step" then
|
||||
local crit_poll = pseudorandom(pseudoseed("cry_critical"))
|
||||
crit_poll = crit_poll / (G.GAME.probabilities.normal or 1)
|
||||
if crit_poll < self.config.cry_crit_rate then
|
||||
args.mult = args.mult ^ 2
|
||||
update_hand_text({ delay = 0 }, { mult = args.mult, chips = args.chips })
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
play_sound("talisman_emult", 1)
|
||||
attention_text({
|
||||
scale = 1.4,
|
||||
text = localize("cry_critical_hit_ex"),
|
||||
hold = 2,
|
||||
align = "cm",
|
||||
offset = { x = 0, y = -2.7 },
|
||||
major = G.play,
|
||||
})
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
elseif crit_poll < self.config.cry_crit_rate + self.config.cry_crit_miss_rate then
|
||||
args.mult = args.mult ^ 0.5
|
||||
update_hand_text({ delay = 0 }, { mult = args.mult, chips = args.chips })
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
play_sound("timpani", 1)
|
||||
attention_text({
|
||||
scale = 1.4,
|
||||
text = localize("cry_critical_miss_ex"),
|
||||
hold = 2,
|
||||
align = "cm",
|
||||
offset = { x = 0, y = -2.7 },
|
||||
major = G.play,
|
||||
})
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end
|
||||
delay(0.6)
|
||||
return args.chips, args.mult
|
||||
end
|
||||
end,
|
||||
})
|
||||
local legendarysleeve = CardSleeves.Sleeve({
|
||||
key = "legendary_sleeve",
|
||||
name = "Legendary Sleeve",
|
||||
atlas = "atlasSleeves",
|
||||
pos = { x = 1, y = 1 },
|
||||
config = { cry_legendary = true, cry_legendary_rate = 0.2 },
|
||||
unlocked = true,
|
||||
unlock_condition = { deck = "Legendary Deck", stake = 1 },
|
||||
loc_vars = function(self)
|
||||
return { vars = {} }
|
||||
end,
|
||||
trigger_effect = function(self, args)
|
||||
if args.context == "eval" and G.GAME.last_blind and G.GAME.last_blind.boss then
|
||||
if G.jokers then
|
||||
if #G.jokers.cards < G.jokers.config.card_limit then
|
||||
local legendary_poll = pseudorandom(pseudoseed("cry_legendary"))
|
||||
legendary_poll = legendary_poll / (G.GAME.probabilities.normal or 1)
|
||||
if legendary_poll < self.config.cry_legendary_rate then
|
||||
local card = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
|
||||
card:add_to_deck()
|
||||
card:start_materialize()
|
||||
G.jokers:emplace(card)
|
||||
return true
|
||||
else
|
||||
card_eval_status_text(
|
||||
G.jokers,
|
||||
"jokers",
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
{ message = localize("k_nope_ex"), colour = G.C.RARITY[4] }
|
||||
)
|
||||
end
|
||||
else
|
||||
card_eval_status_text(
|
||||
G.jokers,
|
||||
"jokers",
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
{ message = localize("k_no_room_ex"), colour = G.C.RARITY[4] }
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
apply = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
if G.jokers then
|
||||
local card = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
|
||||
card:add_to_deck()
|
||||
card:start_materialize()
|
||||
G.jokers:emplace(card)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
})
|
||||
local spookysleeve = CardSleeves.Sleeve({
|
||||
key = "spooky_sleeve",
|
||||
name = "Spooky Sleeve",
|
||||
atlas = "atlasSleeves",
|
||||
pos = { x = 2, y = 1 },
|
||||
config = { cry_spooky = true, cry_curse_rate = 0.25 },
|
||||
unlocked = true,
|
||||
unlock_condition = { deck = "Spooky Deck", stake = 1 },
|
||||
loc_vars = function(self)
|
||||
return { vars = {} }
|
||||
end,
|
||||
|
||||
trigger_effect = function(self, args) end,
|
||||
apply = function(self)
|
||||
G.GAME.modifiers.cry_spooky = true
|
||||
G.GAME.modifiers.cry_curse_rate = self.config.cry_curse_rate or 0.25
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
if G.jokers then
|
||||
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_cry_chocolate_dice")
|
||||
card:add_to_deck()
|
||||
card:start_materialize()
|
||||
card:set_eternal(true)
|
||||
G.jokers:emplace(card)
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
})
|
||||
local bountifulsleeve = CardSleeves.Sleeve({
|
||||
key = "bountiful_sleeve",
|
||||
name = "Bountiful Sleeve",
|
||||
atlas = "atlasSleeves",
|
||||
pos = { x = 0, y = 2 },
|
||||
config = { cry_forced_draw_amount = 5 },
|
||||
unlocked = true,
|
||||
unlock_condition = { deck = "Bountiful Deck", stake = 1 },
|
||||
loc_vars = function(self)
|
||||
return { vars = {} }
|
||||
end,
|
||||
|
||||
trigger_effect = function(self, args) end,
|
||||
apply = function(self)
|
||||
G.GAME.modifiers.cry_forced_draw_amount = self.config.cry_forced_draw_amount
|
||||
end,
|
||||
})
|
||||
local sleeveitems = { atlasSleeves }
|
||||
if CardSleeves and Cryptid.enabled["Misc. Decks"] then
|
||||
sleeveitems[#sleeveitems + 1] = encodedsleeve
|
||||
sleeveitems[#sleeveitems + 1] = equilibriumsleeve
|
||||
sleeveitems[#sleeveitems + 1] = misprintsleeve
|
||||
sleeveitems[#sleeveitems + 1] = infinitesleeve
|
||||
sleeveitems[#sleeveitems + 1] = conveyorsleeve
|
||||
sleeveitems[#sleeveitems + 1] = CCDsleeve
|
||||
sleeveitems[#sleeveitems + 1] = wormholesleeve
|
||||
sleeveitems[#sleeveitems + 1] = redeemedsleeve
|
||||
sleeveitems[#sleeveitems + 1] = criticalsleeve
|
||||
sleeveitems[#sleeveitems + 1] = legendarysleeve
|
||||
sleeveitems[#sleeveitems + 1] = spookysleeve
|
||||
sleeveitems[#sleeveitems + 1] = bountifulsleeve
|
||||
end
|
||||
end
|
||||
return { name = "Sleeves", init = function() end, items = { sleeveitems } }
|
1274
Cryptid/Items/Spectrals.lua
Normal file
1467
Cryptid/Items/Spooky.lua
Normal file
607
Cryptid/Items/Stakes.lua
Normal file
|
@ -0,0 +1,607 @@
|
|||
local pink = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Pink Stake",
|
||||
key = "pink",
|
||||
pos = { x = 0, y = 0 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "gold" },
|
||||
prefix_config = { applied_stakes = { mod = false } },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.scaling = (G.GAME.modifiers.scaling or 1) + 1
|
||||
end,
|
||||
order = 9,
|
||||
colour = HEX("ff5ee6"),
|
||||
}
|
||||
local brown = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Brown Stake",
|
||||
key = "brown",
|
||||
pos = { x = 1, y = 0 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_pink" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_eternal_perishable_compat = true
|
||||
end,
|
||||
order = 10,
|
||||
colour = HEX("883200"),
|
||||
}
|
||||
local yellow = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Yellow Stake",
|
||||
key = "yellow",
|
||||
pos = { x = 2, y = 0 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_brown" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_any_stickers = true
|
||||
end,
|
||||
order = 11,
|
||||
colour = HEX("f7ff1f"),
|
||||
}
|
||||
local jade = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Jade Stake",
|
||||
key = "jade",
|
||||
pos = { x = 3, y = 0 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_yellow" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.flipped_cards = 20
|
||||
end,
|
||||
shiny = true,
|
||||
order = 12,
|
||||
colour = HEX("78953c"),
|
||||
}
|
||||
local cyan = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Cyan Stake",
|
||||
key = "cyan",
|
||||
pos = { x = 4, y = 0 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_jade" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_rarer_jokers = true
|
||||
-- Note that this is not the exact rarity as the old lovely patch might be nerf/buff to the stake
|
||||
G.GAME.uncommon_mod = 0.8
|
||||
G.GAME.rare_mod = 0.8
|
||||
end,
|
||||
order = 13,
|
||||
colour = HEX("39ffcc"),
|
||||
}
|
||||
local gray = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Gray Stake",
|
||||
key = "gray",
|
||||
pos = { x = 0, y = 1 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_cyan" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_reroll_scaling = 2
|
||||
end,
|
||||
order = 14,
|
||||
colour = HEX("999999"),
|
||||
}
|
||||
local crimson = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Crimson Stake",
|
||||
key = "crimson",
|
||||
pos = { x = 1, y = 1 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_gray" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_voucher_restock_antes = 2
|
||||
end,
|
||||
order = 15,
|
||||
colour = HEX("800000"),
|
||||
}
|
||||
local diamond = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Diamond Stake",
|
||||
key = "diamond",
|
||||
pos = { x = 2, y = 1 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_crimson" },
|
||||
modifiers = function()
|
||||
G.GAME.win_ante = 10
|
||||
end,
|
||||
shiny = true,
|
||||
order = 16,
|
||||
colour = HEX("88e5d9"),
|
||||
}
|
||||
local amber = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Amber Stake",
|
||||
key = "amber",
|
||||
pos = { x = 3, y = 1 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_diamond" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_booster_packs = 1
|
||||
end,
|
||||
shiny = true,
|
||||
order = 17,
|
||||
colour = HEX("feb900"),
|
||||
}
|
||||
local bronze = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Bronze Stake",
|
||||
key = "bronze",
|
||||
pos = { x = 4, y = 1 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_amber" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_voucher_price_hike = 1.5
|
||||
end,
|
||||
shiny = true,
|
||||
order = 18,
|
||||
colour = HEX("d27c37"),
|
||||
}
|
||||
local quartz = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Quartz Stake",
|
||||
key = "quartz",
|
||||
pos = { x = 0, y = 2 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_bronze" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_enable_pinned_in_shop = true
|
||||
end,
|
||||
shiny = true,
|
||||
order = 19,
|
||||
colour = HEX("e8e8e8"),
|
||||
}
|
||||
local ruby = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Ruby Stake",
|
||||
key = "ruby",
|
||||
pos = { x = 1, y = 2 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_quartz" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_big_boss_rate = 0.3
|
||||
end,
|
||||
shiny = true,
|
||||
order = 20,
|
||||
colour = HEX("fc5f55"),
|
||||
}
|
||||
local glass = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Glass Stake",
|
||||
key = "glass",
|
||||
pos = { x = 2, y = 2 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_ruby" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_shatter_rate = 30
|
||||
end,
|
||||
shiny = true,
|
||||
order = 21,
|
||||
colour = HEX("ffffff8f"),
|
||||
}
|
||||
local sapphire = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Sapphire Stake",
|
||||
key = "sapphire",
|
||||
pos = { x = 3, y = 2 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_glass" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_ante_tax = 0.25
|
||||
G.GAME.modifiers.cry_ante_tax_max = 10
|
||||
end,
|
||||
shiny = true,
|
||||
order = 22,
|
||||
colour = HEX("3551fc"),
|
||||
}
|
||||
local emerald = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Emerald Stake",
|
||||
key = "emerald",
|
||||
pos = { x = 4, y = 2 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_sapphire" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_enable_flipped_in_shop = true
|
||||
end,
|
||||
shiny = true,
|
||||
order = 23,
|
||||
colour = HEX("06fc2c"),
|
||||
}
|
||||
local platinum = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Platinum Stake",
|
||||
key = "platinum",
|
||||
pos = { x = 0, y = 3 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_emerald" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_no_small_blind = true
|
||||
G.GAME.round_resets.blind_states["Small"] = "Hide"
|
||||
end,
|
||||
shiny = true,
|
||||
order = 24,
|
||||
colour = HEX("b0f6ff"),
|
||||
}
|
||||
--init colors so they have references
|
||||
G.C.CRY_TWILIGHT = { 0, 0, 0, 0 }
|
||||
G.C.CRY_VERDANT = { 0, 0, 0, 0 }
|
||||
G.C.CRY_EMBER = { 0, 0, 0, 0 }
|
||||
G.C.CRY_DAWN = { 0, 0, 0, 0 }
|
||||
G.C.CRY_HORIZON = { 0, 0, 0, 0 }
|
||||
G.C.CRY_BLOSSOM = { 0, 0, 0, 0 }
|
||||
G.C.CRY_AZURE = { 0, 0, 0, 0 }
|
||||
G.C.CRY_ASCENDANT = { 0, 0, 0, 0 }
|
||||
local twilight = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Twilight Stake",
|
||||
key = "twilight",
|
||||
pos = { x = 1, y = 3 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_platinum" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.enable_banana = true
|
||||
end,
|
||||
shiny = true,
|
||||
order = 25,
|
||||
colour = G.C.CRY_TWILIGHT,
|
||||
}
|
||||
local banana = {
|
||||
object_type = "Sticker",
|
||||
badge_colour = HEX("e8c500"),
|
||||
prefix_config = { key = false },
|
||||
key = "banana",
|
||||
atlas = "sticker",
|
||||
pos = { x = 5, y = 2 },
|
||||
should_apply = false,
|
||||
loc_vars = function(self, info_queue, card)
|
||||
if card.ability.consumeable then
|
||||
return { key = "cry_banana_consumeable", vars = { G.GAME.probabilities.normal or 1, 4 } }
|
||||
elseif card.ability.set == "Voucher" then
|
||||
return { key = "cry_banana_voucher", vars = { G.GAME.probabilities.normal or 1, 12 } }
|
||||
elseif card.ability.set == "Booster" then
|
||||
return { key = "cry_banana_booster" }
|
||||
else
|
||||
return { vars = { G.GAME.probabilities.normal or 1, 10 } }
|
||||
end
|
||||
end,
|
||||
}
|
||||
local verdant = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Verdant Stake",
|
||||
key = "verdant",
|
||||
pos = { x = 2, y = 3 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_twilight" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.scaling = (G.GAME.modifiers.scaling or 1) + 1
|
||||
end,
|
||||
shiny = true,
|
||||
order = 26,
|
||||
colour = G.C.CRY_VERDANT,
|
||||
}
|
||||
local ember = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Ember Stake",
|
||||
key = "ember",
|
||||
pos = { x = 3, y = 3 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_verdant" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_no_sell_value = true
|
||||
end,
|
||||
shiny = true,
|
||||
order = 27,
|
||||
colour = G.C.CRY_EMBER,
|
||||
}
|
||||
local dawn = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Dawn Stake",
|
||||
key = "dawn",
|
||||
pos = { x = 4, y = 3 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_ember" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_consumable_reduce = true
|
||||
end,
|
||||
shiny = true,
|
||||
order = 28,
|
||||
colour = G.C.CRY_DAWN,
|
||||
}
|
||||
local horizon = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Horizon Stake",
|
||||
key = "horizon",
|
||||
pos = { x = 0, y = 4 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_dawn" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_card_each_round = true
|
||||
end,
|
||||
shiny = true,
|
||||
order = 29,
|
||||
colour = G.C.CRY_HORIZON,
|
||||
}
|
||||
local blossom = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Blossom Stake",
|
||||
key = "blossom",
|
||||
pos = { x = 1, y = 4 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_horizon" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_big_showdown = true
|
||||
end,
|
||||
shiny = true,
|
||||
order = 30,
|
||||
colour = G.C.CRY_BLOSSOM,
|
||||
}
|
||||
local azure = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Azure Stake",
|
||||
key = "azure",
|
||||
pos = { x = 2, y = 4 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_blossom" },
|
||||
modifiers = function()
|
||||
G.GAME.modifiers.cry_jkr_misprint_mod = 0.8
|
||||
end,
|
||||
shiny = true,
|
||||
order = 31,
|
||||
colour = G.C.CRY_AZURE,
|
||||
}
|
||||
local ascendant = {
|
||||
object_type = "Stake",
|
||||
name = "cry-Ascendant Stake",
|
||||
key = "ascendant",
|
||||
pos = { x = 3, y = 4 },
|
||||
atlas = "stake",
|
||||
applied_stakes = { "cry_azure" },
|
||||
modifiers = function()
|
||||
change_shop_size(-1)
|
||||
end,
|
||||
shiny = true,
|
||||
order = 32,
|
||||
colour = G.C.CRY_ASCENDANT,
|
||||
}
|
||||
local stake_atlas = { object_type = "Atlas", key = "stake",
|
||||
path = "stake_cry.png", px = 29, py = 29 }
|
||||
return {
|
||||
name = "More Stakes",
|
||||
init = function(self)
|
||||
-- Disallow use of Debuffed Perishable consumables
|
||||
local cuc = Card.can_use_consumeable
|
||||
function Card:can_use_consumeable(any_state, skip_check)
|
||||
if self.ability.perish_tally == nil then
|
||||
self.ability.perish_tally = G.GAME.perishable_rounds or 5
|
||||
end
|
||||
if self.ability.perishable and self.ability.perish_tally <= 0 then
|
||||
return false
|
||||
end
|
||||
return cuc(self, any_state, skip_check)
|
||||
end
|
||||
-- Overriding Steamodded's registering of Incantation/Familiar/Grim
|
||||
local function random_destroy(used_tarot)
|
||||
local destroyed_cards = {}
|
||||
local temp_hand = {}
|
||||
local hasHand = false
|
||||
for k, v in ipairs(G.hand.cards) do
|
||||
if not v.ability.eternal then
|
||||
temp_hand[#temp_hand + 1] = v
|
||||
hasHand = true
|
||||
end
|
||||
end
|
||||
if hasHand then
|
||||
destroyed_cards[#destroyed_cards + 1] = pseudorandom_element(temp_hand, pseudoseed("random_destroy"))
|
||||
end
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.4,
|
||||
func = function()
|
||||
play_sound("tarot1")
|
||||
if used_tarot and used_tarot.juice_up then
|
||||
used_tarot:juice_up(0.3, 0.5)
|
||||
end
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.1,
|
||||
func = function()
|
||||
for i = #destroyed_cards, 1, -1 do
|
||||
local card = destroyed_cards[i]
|
||||
if card.ability.name == "Glass Card" then
|
||||
card:shatter()
|
||||
else
|
||||
card:start_dissolve(nil, i ~= #destroyed_cards)
|
||||
end
|
||||
end
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
return destroyed_cards
|
||||
end
|
||||
SMODS.Consumable:take_ownership("grim", {
|
||||
use = function(self, card, area, copier)
|
||||
local used_tarot = copier or card
|
||||
local destroyed_cards = random_destroy(used_tarot)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.7,
|
||||
func = function()
|
||||
local cards = {}
|
||||
for i = 1, card.ability.extra do
|
||||
cards[i] = true
|
||||
local suit_list = {}
|
||||
for i = #SMODS.Suit.obj_buffer, 1, -1 do
|
||||
suit_list[#suit_list + 1] = SMODS.Suit.obj_buffer[i]
|
||||
end
|
||||
local _suit, _rank =
|
||||
SMODS.Suits[pseudorandom_element(suit_list, pseudoseed("grim_create"))].card_key, "A"
|
||||
local cen_pool = {}
|
||||
for k, v in pairs(G.P_CENTER_POOLS["Enhanced"]) do
|
||||
if v.key ~= "m_stone" then
|
||||
cen_pool[#cen_pool + 1] = v
|
||||
end
|
||||
end
|
||||
create_playing_card({
|
||||
front = G.P_CARDS[_suit .. "_" .. _rank],
|
||||
center = pseudorandom_element(cen_pool, pseudoseed("spe_card")),
|
||||
}, G.hand, nil, i ~= 1, { G.C.SECONDARY_SET.Spectral })
|
||||
end
|
||||
playing_card_joker_effects(cards)
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
delay(0.3)
|
||||
for i = 1, #G.jokers.cards do
|
||||
G.jokers.cards[i]:calculate_joker({ remove_playing_cards = true, removed = destroyed_cards })
|
||||
end
|
||||
end,
|
||||
}, true)
|
||||
SMODS.Consumable:take_ownership("familiar", {
|
||||
use = function(self, card, area, copier)
|
||||
local used_tarot = copier or card
|
||||
local destroyed_cards = random_destroy(used_tarot)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.7,
|
||||
func = function()
|
||||
local cards = {}
|
||||
for i = 1, card.ability.extra do
|
||||
cards[i] = true
|
||||
local suit_list = {}
|
||||
for i = #SMODS.Suit.obj_buffer, 1, -1 do
|
||||
suit_list[#suit_list + 1] = SMODS.Suit.obj_buffer[i]
|
||||
end
|
||||
local faces = {}
|
||||
for _, v in ipairs(SMODS.Rank.obj_buffer) do
|
||||
local r = SMODS.Ranks[v]
|
||||
if r.face then
|
||||
table.insert(faces, r.card_key)
|
||||
end
|
||||
end
|
||||
local _suit, _rank =
|
||||
SMODS.Suits[pseudorandom_element(suit_list, pseudoseed("familiar_create"))].card_key,
|
||||
pseudorandom_element(faces, pseudoseed("familiar_create"))
|
||||
local cen_pool = {}
|
||||
for k, v in pairs(G.P_CENTER_POOLS["Enhanced"]) do
|
||||
if v.key ~= "m_stone" then
|
||||
cen_pool[#cen_pool + 1] = v
|
||||
end
|
||||
end
|
||||
create_playing_card({
|
||||
front = G.P_CARDS[_suit .. "_" .. _rank],
|
||||
center = pseudorandom_element(cen_pool, pseudoseed("spe_card")),
|
||||
}, G.hand, nil, i ~= 1, { G.C.SECONDARY_SET.Spectral })
|
||||
end
|
||||
playing_card_joker_effects(cards)
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
delay(0.3)
|
||||
for i = 1, #G.jokers.cards do
|
||||
G.jokers.cards[i]:calculate_joker({ remove_playing_cards = true, removed = destroyed_cards })
|
||||
end
|
||||
end,
|
||||
}, true)
|
||||
SMODS.Consumable:take_ownership("incantation", {
|
||||
use = function(self, card, area, copier)
|
||||
local used_tarot = copier or card
|
||||
local destroyed_cards = random_destroy(used_tarot)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.7,
|
||||
func = function()
|
||||
local cards = {}
|
||||
for i = 1, card.ability.extra do
|
||||
cards[i] = true
|
||||
local suit_list = {}
|
||||
for i = #SMODS.Suit.obj_buffer, 1, -1 do
|
||||
suit_list[#suit_list + 1] = SMODS.Suit.obj_buffer[i]
|
||||
end
|
||||
local numbers = {}
|
||||
for _RELEASE_MODE, v in ipairs(SMODS.Rank.obj_buffer) do
|
||||
local r = SMODS.Ranks[v]
|
||||
if v ~= "Ace" and not r.face then
|
||||
table.insert(numbers, r.card_key)
|
||||
end
|
||||
end
|
||||
local _suit, _rank =
|
||||
SMODS.Suits[pseudorandom_element(suit_list, pseudoseed("incantation_create"))].card_key,
|
||||
pseudorandom_element(numbers, pseudoseed("incantation_create"))
|
||||
local cen_pool = {}
|
||||
for k, v in pairs(G.P_CENTER_POOLS["Enhanced"]) do
|
||||
if v.key ~= "m_stone" then
|
||||
cen_pool[#cen_pool + 1] = v
|
||||
end
|
||||
end
|
||||
create_playing_card({
|
||||
front = G.P_CARDS[_suit .. "_" .. _rank],
|
||||
center = pseudorandom_element(cen_pool, pseudoseed("spe_card")),
|
||||
}, G.hand, nil, i ~= 1, { G.C.SECONDARY_SET.Spectral })
|
||||
end
|
||||
playing_card_joker_effects(cards)
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
delay(0.3)
|
||||
for i = 1, #G.jokers.cards do
|
||||
G.jokers.cards[i]:calculate_joker({ remove_playing_cards = true, removed = destroyed_cards })
|
||||
end
|
||||
end,
|
||||
}, true)
|
||||
|
||||
local sc = Card.set_cost
|
||||
function Card:set_cost()
|
||||
sc(self)
|
||||
if self.ability.set == "Voucher" and G.GAME.modifiers.cry_voucher_price_hike then
|
||||
self.cost = math.floor(self.cost * G.GAME.modifiers.cry_voucher_price_hike)
|
||||
--Update related costs
|
||||
self.sell_cost = math.max(1, math.floor(self.cost / 2)) + (self.ability.extra_value or 0)
|
||||
if
|
||||
self.area
|
||||
and self.ability.couponed
|
||||
and (self.area == G.shop_jokers or self.area == G.shop_booster)
|
||||
then
|
||||
self.cost = 0
|
||||
end
|
||||
self.sell_cost_label = self.facing == "back" and "?" or self.sell_cost
|
||||
end
|
||||
end
|
||||
for _, v in pairs(self.items) do
|
||||
if v.object_type == "Stake" then
|
||||
v.sticker_pos = v.pos
|
||||
v.sticker_atlas = "sticker"
|
||||
end
|
||||
end
|
||||
end,
|
||||
items = {
|
||||
stake_atlas,
|
||||
pink,
|
||||
brown,
|
||||
yellow,
|
||||
jade,
|
||||
cyan,
|
||||
gray,
|
||||
crimson,
|
||||
diamond,
|
||||
amber,
|
||||
bronze,
|
||||
quartz,
|
||||
ruby,
|
||||
glass,
|
||||
sapphire,
|
||||
emerald,
|
||||
platinum,
|
||||
twilight,
|
||||
verdant,
|
||||
ember,
|
||||
dawn,
|
||||
horizon,
|
||||
blossom,
|
||||
azure,
|
||||
ascendant,
|
||||
banana,
|
||||
},
|
||||
}
|
967
Cryptid/Items/Tags.lua
Normal file
|
@ -0,0 +1,967 @@
|
|||
local cat = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 0, y = 2 },
|
||||
key = "cat",
|
||||
name = "cry-Cat Tag",
|
||||
order = 12,
|
||||
}
|
||||
local epic_tag = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 3, y = 0 },
|
||||
name = "cry-Epic Tag",
|
||||
order = 1,
|
||||
min_ante = 2,
|
||||
requires = 'j_cry_googol_play',
|
||||
config = { type = "store_joker_create" },
|
||||
key = "epic",
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "store_joker_create" then
|
||||
local rares_in_posession = { 0 }
|
||||
for k, v in ipairs(G.jokers.cards) do
|
||||
if v.config.center.rarity == "cry_epic" and not rares_in_posession[v.config.center.key] then
|
||||
rares_in_posession[1] = rares_in_posession[1] + 1
|
||||
rares_in_posession[v.config.center.key] = true
|
||||
end
|
||||
end
|
||||
local card
|
||||
if #G.P_JOKER_RARITY_POOLS.cry_epic > rares_in_posession[1] then
|
||||
card = create_card("Joker", context.area, nil, 'cry_epic', nil, nil, nil, "cry_eta")
|
||||
create_shop_card_ui(card, "Joker", context.area)
|
||||
card.states.visible = false
|
||||
tag:yep("+", G.C.RARITY.cry_epic, function()
|
||||
card:start_materialize()
|
||||
card.misprint_cost_fac = 0.5
|
||||
card:set_cost()
|
||||
return true
|
||||
end)
|
||||
else
|
||||
tag:nope()
|
||||
end
|
||||
tag.triggered = true
|
||||
return card
|
||||
end
|
||||
end,
|
||||
}
|
||||
local schematic = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 1, y = 2 },
|
||||
name = "cry-Schematic Tag",
|
||||
order = 24,
|
||||
requires = 'j_brainstorm',
|
||||
config = { type = "store_joker_create" },
|
||||
key = "schematic",
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = { set = "Joker", key = "j_brainstorm" }
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "store_joker_create" then
|
||||
local card
|
||||
card = create_card("Joker", context.area, nil, nil, nil, nil, "j_brainstorm")
|
||||
create_shop_card_ui(card, "Joker", context.area)
|
||||
card.states.visible = false
|
||||
tag:yep("+", G.C.RED, function()
|
||||
card:start_materialize()
|
||||
card:set_cost()
|
||||
return true
|
||||
end)
|
||||
tag.triggered = true
|
||||
return card
|
||||
end
|
||||
end,
|
||||
}
|
||||
local empoweredPack = {
|
||||
object_type = "Booster",
|
||||
name = "cry-Empowered Pack",
|
||||
key = "empowered",
|
||||
kind = "Spectral",
|
||||
no_doe = true,
|
||||
atlas = "empowered",
|
||||
pos = { x = 3, y = 1 },
|
||||
config = { extra = 2, choose = 1 },
|
||||
cost = 0,
|
||||
weight = 0,
|
||||
order = 8,
|
||||
draw_hand = true,
|
||||
update_pack = SMODS.Booster.update_pack,
|
||||
loc_vars = SMODS.Booster.loc_vars,
|
||||
ease_background_colour = function(self)
|
||||
ease_background_colour_blind(G.STATES.SPECTRAL_PACK)
|
||||
end,
|
||||
create_UIBox = function(self)
|
||||
return create_UIBox_spectral_pack()
|
||||
end,
|
||||
particles = function(self)
|
||||
G.booster_pack_sparkles = Particles(1, 1, 0, 0, {
|
||||
timer = 0.015,
|
||||
scale = 0.1,
|
||||
initialize = true,
|
||||
lifespan = 3,
|
||||
speed = 0.2,
|
||||
padding = -1,
|
||||
attach = G.ROOM_ATTACH,
|
||||
colours = { G.C.WHITE, lighten(G.C.GOLD, 0.2) },
|
||||
fill = true,
|
||||
})
|
||||
G.booster_pack_sparkles.fade_alpha = 1
|
||||
G.booster_pack_sparkles:fade(1, 0)
|
||||
end,
|
||||
create_card = function(self, card, i)
|
||||
if i % 2 == 1 and Cryptid.enabled["Exotic Jokers"] then
|
||||
return create_card("Spectral", G.pack_cards, nil, nil, true, true, "c_cry_gateway")
|
||||
else
|
||||
return create_card("Spectral", G.pack_cards, nil, nil, true, true, "c_soul")
|
||||
end
|
||||
end,
|
||||
group_key = "k_spectral_pack",
|
||||
}
|
||||
local empoweredpack_sprite = {
|
||||
object_type = "Atlas",
|
||||
key = "empowered",
|
||||
path = "pack_cry.png",
|
||||
px = 71,
|
||||
py = 95,
|
||||
}
|
||||
local empowered = {
|
||||
object_type = "Tag",
|
||||
name = "cry-Empowered Tag",
|
||||
order = 18,
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 1, y = 0 },
|
||||
config = { type = "new_blind_choice" },
|
||||
key = "empowered",
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = G.P_CENTERS.p_spectral_normal_1
|
||||
info_queue[#info_queue + 1] = { set = "Spectral", key = "c_soul" }
|
||||
if Cryptid.enabled["Exotic Jokers"] then
|
||||
info_queue[#info_queue + 1] = { set = "Spectral", key = "c_cry_gateway" }
|
||||
end
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "new_blind_choice" then
|
||||
if G.STATE ~= G.STATES.SPECTRAL_PACK then
|
||||
G.GAME.PACK_INTERRUPT = G.STATE
|
||||
end
|
||||
tag:yep("+", G.C.SECONDARY_SET.Spectral, function()
|
||||
local key = "p_cry_empowered"
|
||||
local card = Card(
|
||||
G.play.T.x + G.play.T.w / 2 - G.CARD_W * 1.27 / 2,
|
||||
G.play.T.y + G.play.T.h / 2 - G.CARD_H * 1.27 / 2,
|
||||
G.CARD_W * 1.27,
|
||||
G.CARD_H * 1.27,
|
||||
G.P_CARDS.empty,
|
||||
G.P_CENTERS[key],
|
||||
{ bypass_discovery_center = true, bypass_discovery_ui = true }
|
||||
)
|
||||
card.cost = 0
|
||||
card.from_tag = true
|
||||
G.FUNCS.use_card({ config = { ref_table = card } })
|
||||
card:start_materialize()
|
||||
return true
|
||||
end)
|
||||
tag.triggered = true
|
||||
return true
|
||||
end
|
||||
end,
|
||||
in_pool = function()
|
||||
return false
|
||||
end,
|
||||
}
|
||||
local gambler = {
|
||||
object_type = "Tag",
|
||||
name = "cry-Gamblecore",
|
||||
order = 13,
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 2, y = 0 },
|
||||
config = { type = "immediate", odds = 4 },
|
||||
min_ante = 2,
|
||||
key = "gambler",
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = { set = "Tag", key = "tag_cry_empowered" }
|
||||
return { vars = { G.GAME.probabilities.normal or 1, self.config.odds } }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "immediate" then
|
||||
if pseudorandom("cry_gambler_tag") < G.GAME.probabilities.normal / tag.config.odds then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
tag:yep("+", G.C.RARITY.cry_exotic, function()
|
||||
add_tag(Tag("tag_cry_empowered"))
|
||||
G.E_MANAGER:add_event(Event({
|
||||
trigger = "after",
|
||||
delay = 0.3,
|
||||
func = function()
|
||||
if not G.GAME.PACK_INTERRUPT then
|
||||
G.GAME.tags[#G.GAME.tags]:apply_to_run({ type = "new_blind_choice" })
|
||||
end
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
return true
|
||||
end)
|
||||
else
|
||||
tag:nope()
|
||||
end
|
||||
tag.triggered = true
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
local bundle = {
|
||||
object_type = "Tag",
|
||||
name = "cry-Bundle Tag",
|
||||
order = 16,
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 0, y = 0 },
|
||||
config = { type = "immediate" },
|
||||
key = "bundle",
|
||||
min_ante = 2,
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = { set = "Tag", key = "tag_standard" }
|
||||
info_queue[#info_queue + 1] = { set = "Tag", key = "tag_charm" }
|
||||
info_queue[#info_queue + 1] = { set = "Tag", key = "tag_meteor" }
|
||||
info_queue[#info_queue + 1] = { set = "Tag", key = "tag_buffoon" }
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "immediate" then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
tag:yep("+", G.C.ATTENTION, function()
|
||||
add_tag(Tag("tag_standard"))
|
||||
add_tag(Tag("tag_charm"))
|
||||
add_tag(Tag("tag_meteor"))
|
||||
add_tag(Tag("tag_buffoon"))
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
tag.triggered = true
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
local memory = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 3, y = 1 },
|
||||
name = "cry-Memory Tag",
|
||||
order = 15,
|
||||
config = { type = "immediate", num = 2 },
|
||||
key = "memory",
|
||||
loc_vars = function(self, info_queue)
|
||||
if G.GAME.cry_last_tag_used then
|
||||
_c = G.P_TAGS[G.GAME.cry_last_tag_used]
|
||||
end
|
||||
local loc_tag = _c and localize({ type = "name_text", key = G.GAME.cry_last_tag_used, set = _c.set })
|
||||
or localize("k_none")
|
||||
return { vars = { self.config.num, loc_tag } }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "immediate" and G.GAME.cry_last_tag_used then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
tag:yep("+", G.C.ATTENTION, function()
|
||||
for i = 1, 2 do
|
||||
local t = Tag(G.GAME.cry_last_tag_used)
|
||||
t.ability.orbital_hand = G.GAME.cry_memory_orbital
|
||||
add_tag(t)
|
||||
end
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
tag.triggered = true
|
||||
return true
|
||||
end
|
||||
end,
|
||||
in_pool = function()
|
||||
return G.GAME.cry_last_tag_used and true
|
||||
end,
|
||||
}
|
||||
local glitched_tag = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 5, y = 0 },
|
||||
name = "cry-Glitched Tag",
|
||||
order = 2,
|
||||
config = { type = "store_joker_modify", edition = "cry_glitched" },
|
||||
key = "glitched",
|
||||
min_ante = 1,
|
||||
requires = 'e_cry_glitched',
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_glitched
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "store_joker_modify" then
|
||||
local _applied = nil
|
||||
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == 'Joker' then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
context.card.temp_edition = true
|
||||
tag:yep('+', G.C.DARK_EDITION,function()
|
||||
context.card:set_edition({cry_glitched = true}, true)
|
||||
context.card.ability.couponed = true
|
||||
context.card:set_cost()
|
||||
context.card.temp_edition = nil
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
_applied = true
|
||||
tag.triggered = true
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
local oversat_tag = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 7, y = 1 },
|
||||
name = "cry-Oversaturated Tag",
|
||||
order = 4,
|
||||
config = { type = "store_joker_modify", edition = "cry_oversat" },
|
||||
key = "oversat",
|
||||
requires = 'e_cry_oversat',
|
||||
min_ante = 2,
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_oversat
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "store_joker_modify" then
|
||||
local _applied = nil
|
||||
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == 'Joker' then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
context.card.temp_edition = true
|
||||
tag:yep('+', G.C.DARK_EDITION,function()
|
||||
context.card:set_edition({cry_oversat = true}, true)
|
||||
context.card.ability.couponed = true
|
||||
context.card:set_cost()
|
||||
context.card.temp_edition = nil
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
_applied = true
|
||||
tag.triggered = true
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
local mosaic_tag = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 5, y = 1 },
|
||||
name = "cry-Mosaic Tag",
|
||||
order = 3,
|
||||
config = { type = "store_joker_modify", edition = "cry_mosaic" },
|
||||
key = "mosaic",
|
||||
requires = 'e_cry_mosaic',
|
||||
min_ante = 2,
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_mosaic
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "store_joker_modify" then
|
||||
local _applied = nil
|
||||
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == 'Joker' then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
context.card.temp_edition = true
|
||||
tag:yep('+', G.C.DARK_EDITION,function()
|
||||
context.card:set_edition({cry_mosaic = true}, true)
|
||||
context.card.ability.couponed = true
|
||||
context.card:set_cost()
|
||||
context.card.temp_edition = nil
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
_applied = true
|
||||
tag.triggered = true
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
local gold_tag = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 6, y = 0 },
|
||||
name = "cry-Golden Tag",
|
||||
order = 6,
|
||||
config = { type = "store_joker_modify", edition = "cry_gold" },
|
||||
key = "gold",
|
||||
requires = 'e_cry_gold',
|
||||
min_ante = 3,
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_gold
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "store_joker_modify" then
|
||||
local _applied = nil
|
||||
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == 'Joker' then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
context.card.temp_edition = true
|
||||
tag:yep('+', G.C.DARK_EDITION,function()
|
||||
context.card:set_edition({cry_gold = true}, true)
|
||||
context.card.ability.couponed = true
|
||||
context.card:set_cost()
|
||||
context.card.temp_edition = nil
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
_applied = true
|
||||
tag.triggered = true
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
local glass_tag = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 4, y = 0 },
|
||||
name = "cry-Glass Tag",
|
||||
order = 5,
|
||||
config = { type = "store_joker_modify", edition = "cry_glass" },
|
||||
key = "glass",
|
||||
requires = 'e_cry_glass',
|
||||
min_ante = 3,
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_glass
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "store_joker_modify" then
|
||||
local _applied = nil
|
||||
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == 'Joker' then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
context.card.temp_edition = true
|
||||
tag:yep('+', G.C.DARK_EDITION,function()
|
||||
context.card:set_edition({cry_glass = true}, true)
|
||||
context.card.ability.couponed = true
|
||||
context.card:set_cost()
|
||||
context.card.temp_edition = nil
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
_applied = true
|
||||
tag.triggered = true
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
local blur_tag = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 7, y = 0 },
|
||||
name = "cry-Blurred Tag",
|
||||
order = 7,
|
||||
config = { type = "store_joker_modify", edition = "cry_blur" },
|
||||
key = "blur",
|
||||
requires = 'e_cry_blur',
|
||||
min_ante = 3,
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_blur
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "store_joker_modify" then
|
||||
local _applied = nil
|
||||
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == 'Joker' then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
context.card.temp_edition = true
|
||||
tag:yep('+', G.C.DARK_EDITION,function()
|
||||
context.card:set_edition({cry_blur = true}, true)
|
||||
context.card.ability.couponed = true
|
||||
context.card:set_cost()
|
||||
context.card.temp_edition = nil
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
_applied = true
|
||||
tag.triggered = true
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
--order 8 reserved for Noisy tag (if it ever has a shader / comes into existence)
|
||||
local astral_tag = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 6, y = 1 },
|
||||
name = "cry-Astral Tag",
|
||||
order = 9,
|
||||
config = { type = "store_joker_modify", edition = "cry_astral" },
|
||||
key = "astral",
|
||||
requires = 'e_cry_astral',
|
||||
min_ante = 9,
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_astral
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "store_joker_modify" then
|
||||
local _applied = nil
|
||||
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == 'Joker' then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
context.card.temp_edition = true
|
||||
tag:yep('+', G.C.DARK_EDITION,function()
|
||||
context.card:set_edition({cry_astral = true}, true)
|
||||
context.card.ability.couponed = true
|
||||
context.card:set_cost()
|
||||
context.card.temp_edition = nil
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
_applied = true
|
||||
tag.triggered = true
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
local m_tag = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 4, y = 1 },
|
||||
name = "cry-Jolly Tag",
|
||||
order = 10,
|
||||
config = { type = "store_joker_modify", edition = "cry_m" },
|
||||
key = "m",
|
||||
requires = 'e_cry_m',
|
||||
min_ante = 1,
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_m
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "store_joker_modify" then
|
||||
local _applied = nil
|
||||
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == 'Joker' then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
context.card.temp_edition = true
|
||||
tag:yep('M', G.C.DARK_EDITION,function()
|
||||
context.card:set_edition({cry_m = true}, true)
|
||||
context.card.ability.couponed = true
|
||||
context.card:set_cost()
|
||||
context.card.temp_edition = nil
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
_applied = true
|
||||
tag.triggered = true
|
||||
end
|
||||
end
|
||||
end,
|
||||
}
|
||||
--This is fully funcional but unobtainable without pointer at the moment
|
||||
--I have plans for this soon, very soon...
|
||||
local double_m_tag = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 7, y = 2 },
|
||||
name = "cry-Double M Tag",
|
||||
order = 11,
|
||||
config = { type = "store_joker_create", edition = "cry_m" },
|
||||
key = "double_m",
|
||||
requires = 'j_cry_smallestm',
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_m
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "store_joker_create" then
|
||||
local card
|
||||
local option = {}
|
||||
for k, _ in pairs(Cryptid.M_jokers) do
|
||||
if G.P_CENTERS[k] then
|
||||
option[#option + 1] = k
|
||||
end
|
||||
end
|
||||
card = create_card(
|
||||
"Joker",
|
||||
context.area,
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
pseudorandom_element(option, pseudoseed("M_is_love_M_is_life"))
|
||||
)
|
||||
card:set_edition({
|
||||
cry_m = true,
|
||||
})
|
||||
create_shop_card_ui(card, "Joker", context.area)
|
||||
card.states.visible = false
|
||||
tag:yep("MM", G.C.CRY_JOLLY, function()
|
||||
card:start_materialize()
|
||||
card.ability.couponed = true
|
||||
card:set_cost()
|
||||
return true
|
||||
end)
|
||||
tag.triggered = true
|
||||
return card
|
||||
end
|
||||
end,
|
||||
in_pool = function()
|
||||
return false
|
||||
end,
|
||||
}
|
||||
local banana = {
|
||||
object_type = "Tag",
|
||||
name = "cry-Banana Tag",
|
||||
order = 27,
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 5, y = 2 },
|
||||
config = { type = "immediate" },
|
||||
key = "banana",
|
||||
loc_vars = function(self, info_queue)
|
||||
local banana
|
||||
if G.GAME.pool_flags.gros_michel_extinct == true then
|
||||
banana = localize({
|
||||
type = "name_text",
|
||||
set = "Joker",
|
||||
key = G.P_CENTER_POOLS["Joker"][61].key
|
||||
})
|
||||
info_queue[#info_queue + 1] = {
|
||||
set = "Joker",
|
||||
key = "j_cavendish",
|
||||
specific_vars = { 3, G.GAME.probabilities.normal or 1, 1000 }
|
||||
}
|
||||
else
|
||||
banana = localize({
|
||||
type = "name_text",
|
||||
set = "Joker",
|
||||
key = G.P_CENTER_POOLS["Joker"][38].key
|
||||
})
|
||||
info_queue[#info_queue + 1] = {
|
||||
set = "Joker",
|
||||
key = "j_gros_michel",
|
||||
specific_vars = { 15, G.GAME.probabilities.normal or 1, 6 }
|
||||
}
|
||||
end
|
||||
return { vars = { banana } }
|
||||
end,
|
||||
min_ante = 2,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "immediate" then
|
||||
if G.jokers and #G.jokers.cards < G.jokers.config.card_limit then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
tag:yep('+', G.C.PURPLE, function()
|
||||
if G.jokers and #G.jokers.cards < G.jokers.config.card_limit then --Needs another check here because that's how tags work :D:D:D:D:D:D:D
|
||||
if G.GAME.pool_flags.gros_michel_extinct == true then
|
||||
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_cavendish")
|
||||
card:add_to_deck()
|
||||
G.jokers:emplace(card)
|
||||
else
|
||||
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_gros_michel")
|
||||
card:add_to_deck()
|
||||
G.jokers:emplace(card)
|
||||
end
|
||||
end
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
else
|
||||
tag:nope()
|
||||
end
|
||||
tag.triggered = true
|
||||
return true
|
||||
end
|
||||
|
||||
end
|
||||
}
|
||||
local scope = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 6, y = 2 },
|
||||
name = "cry-Scope Tag",
|
||||
order = 23,
|
||||
config = { type = "round_start_bonus", num = 2 },
|
||||
key = "scope",
|
||||
min_ante = 2,
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = {self.config.num} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == 'round_start_bonus' then
|
||||
tag:yep('+', G.C.BLUE,function()
|
||||
return true
|
||||
end)
|
||||
ease_hands_played(tag.config.num)
|
||||
ease_discard(tag.config.num)
|
||||
tag.triggered = true
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
local loss = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 1, y = 3 },
|
||||
name = "cry-Loss Tag",
|
||||
order = 25,
|
||||
config = { type = "new_blind_choice" },
|
||||
key = "loss",
|
||||
min_ante = 2,
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = { set = "Other", key = "p_cry_meme_1", specific_vars = { 2, 5 } }
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "new_blind_choice" then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
tag:yep('+', G.C.SECONDARY_SET.Spectral,function()
|
||||
local key = 'p_cry_meme_1'
|
||||
local card = Card(G.play.T.x + G.play.T.w/2 - G.CARD_W*1.27/2,
|
||||
G.play.T.y + G.play.T.h/2-G.CARD_H*1.27/2, G.CARD_W*1.27, G.CARD_H*1.27, G.P_CARDS.empty, G.P_CENTERS[key], {bypass_discovery_center = true, bypass_discovery_ui = true})
|
||||
card.cost = 0
|
||||
card.from_tag = true
|
||||
G.FUNCS.use_card({config = {ref_table = card}})
|
||||
if G.GAME.modifiers.cry_force_edition and not G.GAME.modifiers.cry_force_random_edition then
|
||||
card:set_edition(nil, true, true)
|
||||
elseif G.GAME.modifiers.cry_force_random_edition then
|
||||
local edition = cry_poll_random_edition()
|
||||
card:set_edition(edition, true, true)
|
||||
end
|
||||
card:start_materialize()
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
tag.triggered = true
|
||||
return true
|
||||
end
|
||||
end,
|
||||
}
|
||||
local gourmand = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 2, y = 3 },
|
||||
name = "cry-Gourmand Tag",
|
||||
order = 17,
|
||||
config = { type = "store_joker_create" },
|
||||
key = "gourmand",
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = { set = "Other", key = "food_jokers" }
|
||||
return { vars = {} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "store_joker_create" then
|
||||
local card
|
||||
card = create_card(
|
||||
"Joker",
|
||||
context.area,
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
nil,
|
||||
Cryptid.get_food("cry_gourmand_tag")
|
||||
)
|
||||
create_shop_card_ui(card, "Joker", context.area)
|
||||
card.states.visible = false
|
||||
tag:yep("+", G.C.GREEN, function()
|
||||
card:start_materialize()
|
||||
card.ability.couponed = true
|
||||
card:set_cost()
|
||||
return true
|
||||
end)
|
||||
tag.triggered = true
|
||||
return card
|
||||
end
|
||||
end,
|
||||
}
|
||||
local better_top_up = {
|
||||
object_type = "Tag",
|
||||
name = "cry-Better Top-up Tag",
|
||||
order = 15,
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 4, y = 3 },
|
||||
config = { type = "immediate", spawn_jokers = 2 },
|
||||
key = "bettertop_up",
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = {self.config.spawn_jokers} }
|
||||
end,
|
||||
min_ante = 5,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "immediate" then
|
||||
if G.jokers and #G.jokers.cards < G.jokers.config.card_limit then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
tag:yep('+', G.C.GREEN, function()
|
||||
for i = 1, tag.config.spawn_jokers do
|
||||
if G.jokers and #G.jokers.cards < G.jokers.config.card_limit then
|
||||
local card = create_card("Joker", G.jokers, nil, 0.8, nil, nil, nil, 'bettertop')
|
||||
card:add_to_deck()
|
||||
G.jokers:emplace(card)
|
||||
end
|
||||
end
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
else
|
||||
tag:nope()
|
||||
end
|
||||
tag.triggered = true
|
||||
return true
|
||||
end
|
||||
end
|
||||
}
|
||||
local better_voucher = {
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 3, y = 3 },
|
||||
name = "cry-Golden Voucher Tag",
|
||||
order = 14,
|
||||
config = { type = "voucher_add" },
|
||||
min_ante = 4,
|
||||
key = "better_voucher",
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = {(SMODS.Mods["Tier3Sub"] and 4 or 3)} }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "voucher_add" then
|
||||
tag:yep('+', G.C.SECONDARY_SET.Voucher,function()
|
||||
G.ARGS.voucher_tag = G.ARGS.voucher_tag or {}
|
||||
local voucher_key = get_next_megavoucher_key(true)
|
||||
G.ARGS.voucher_tag[voucher_key] = true
|
||||
G.shop_vouchers.config.card_limit = G.shop_vouchers.config.card_limit + 1
|
||||
local card = Card(G.shop_vouchers.T.x + G.shop_vouchers.T.w/2,
|
||||
G.shop_vouchers.T.y, G.CARD_W, G.CARD_H, G.P_CARDS.empty, G.P_CENTERS[voucher_key],{bypass_discovery_center = true, bypass_discovery_ui = true})
|
||||
cry_misprintize(card)
|
||||
create_shop_card_ui(card, 'Voucher', G.shop_vouchers)
|
||||
card:start_materialize()
|
||||
if G.GAME.modifiers.cry_force_edition and not G.GAME.modifiers.cry_force_random_edition then
|
||||
card:set_edition(nil, true)
|
||||
elseif G.GAME.modifiers.cry_force_random_edition then
|
||||
local edition = cry_poll_random_edition()
|
||||
card:set_edition(edition, true)
|
||||
end
|
||||
|
||||
if G.GAME.modifiers.cry_force_sticker == 'eternal' or G.GAME.modifiers.cry_sticker_sheet_plus then
|
||||
card:set_eternal(true)
|
||||
card.ability.eternal = true
|
||||
end
|
||||
if G.GAME.modifiers.cry_force_sticker == 'perishable' or G.GAME.modifiers.cry_sticker_sheet_plus then
|
||||
card:set_perishable(true)
|
||||
card.ability.perishable = true
|
||||
end
|
||||
if G.GAME.modifiers.cry_force_sticker == 'rental' or G.GAME.modifiers.cry_sticker_sheet_plus then
|
||||
card:set_rental(true)
|
||||
card.ability.rental = true
|
||||
end
|
||||
if G.GAME.modifiers.cry_force_sticker == 'pinned' or G.GAME.modifiers.cry_sticker_sheet_plus then
|
||||
card.pinned = true
|
||||
end
|
||||
if G.GAME.modifiers.cry_force_sticker == 'banana' or G.GAME.modifiers.cry_sticker_sheet_plus then
|
||||
card.ability.banana = true
|
||||
end
|
||||
if G.GAME.modifiers.cry_sticker_sheet_plus then
|
||||
if G.GAME.modifiers.cry_sticker_sheet then
|
||||
for k, v in pairs(SMODS.Stickers) do
|
||||
v:set_sticker(card, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
G.shop_vouchers:emplace(card)
|
||||
G.ARGS.voucher_tag = nil
|
||||
return true
|
||||
end)
|
||||
tag.triggered = true
|
||||
end
|
||||
end,
|
||||
}
|
||||
local booster = {
|
||||
object_type = "Tag",
|
||||
name = "cry-Booster Tag",
|
||||
order = 28,
|
||||
atlas = "tag_cry",
|
||||
pos = { x = 5, y = 3 },
|
||||
config = { type = "immediate" },
|
||||
key = "booster",
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = {} }
|
||||
end,
|
||||
min_ante = 4,
|
||||
apply = function(self, tag, context)
|
||||
if context.type == "immediate" then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
tag:yep('+', G.C.BLUE, function()
|
||||
G.GAME.boostertag = true
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
tag.triggered = true
|
||||
return true
|
||||
end
|
||||
|
||||
end
|
||||
}
|
||||
local tagitems = {
|
||||
cat,
|
||||
empoweredPack,
|
||||
empowered,
|
||||
gambler,
|
||||
bundle,
|
||||
memory,
|
||||
schematic,
|
||||
banana,
|
||||
scope,
|
||||
gourmand,
|
||||
better_top_up,
|
||||
booster,
|
||||
empoweredpack_sprite,
|
||||
}
|
||||
if Cryptid.enabled["Vouchers"] then
|
||||
tagitems[#tagitems + 1] = better_voucher
|
||||
end
|
||||
if Cryptid.enabled["Epic Jokers"] then
|
||||
tagitems[#tagitems + 1] = epic_tag
|
||||
end
|
||||
if Cryptid.enabled["Misc."] then
|
||||
tagitems[#tagitems + 1] = glitched_tag
|
||||
tagitems[#tagitems + 1] = oversat_tag
|
||||
tagitems[#tagitems + 1] = mosaic_tag
|
||||
tagitems[#tagitems + 1] = gold_tag
|
||||
tagitems[#tagitems + 1] = glass_tag
|
||||
tagitems[#tagitems + 1] = blur_tag
|
||||
tagitems[#tagitems + 1] = astral_tag
|
||||
tagitems[#tagitems + 1] = loss
|
||||
if Cryptid.enabled["M Jokers"] then
|
||||
tagitems[#tagitems + 1] = m_tag
|
||||
tagitems[#tagitems + 1] = double_m_tag
|
||||
end
|
||||
end
|
||||
return {
|
||||
name = "Tags",
|
||||
init = function()
|
||||
--Memory Tag Patches - store last tag used
|
||||
local tapr = Tag.apply_to_run
|
||||
function Tag:apply_to_run(x)
|
||||
local ret = tapr(self, x)
|
||||
if
|
||||
self.triggered
|
||||
and self.key ~= "tag_double"
|
||||
and self.key ~= "tag_cry_memory"
|
||||
and self.key ~= "tag_cry_triple"
|
||||
and self.key ~= "tag_cry_quadruple"
|
||||
and self.key ~= "tag_cry_quintuple"
|
||||
then
|
||||
G.GAME.cry_last_tag_used = self.key
|
||||
G.GAME.cry_memory_orbital = self.ability.orbital_hand
|
||||
end
|
||||
return ret
|
||||
end
|
||||
end,
|
||||
items = tagitems,
|
||||
}
|
971
Cryptid/Items/Vouchers.lua
Normal file
|
@ -0,0 +1,971 @@
|
|||
local voucher_atlas = {
|
||||
object_type = "Atlas",
|
||||
key = "atlasvoucher",
|
||||
path = "atlasvoucher.png",
|
||||
px = 71,
|
||||
py = 95,
|
||||
}
|
||||
local copies = { --Double tags become Triple Tags and are 2X as common
|
||||
object_type = "Voucher",
|
||||
key = "copies",
|
||||
atlas = "atlasvoucher",
|
||||
order = 1,
|
||||
pos = { x = 1, y = 1 },
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue+1] = {set = "Tag", key = "tag_double"}
|
||||
info_queue[#info_queue+1] = {set = "Tag", key = "tag_cry_triple", specific_vars = {2}}
|
||||
return { vars = {} }
|
||||
end,
|
||||
}
|
||||
local tag_printer = { --Double tags become Quadruple Tags and are 3X as common
|
||||
object_type = "Voucher",
|
||||
key = "tag_printer",
|
||||
order = 2,
|
||||
atlas = "atlasvoucher",
|
||||
pos = { x = 1, y = 2 },
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue+1] = {set = "Tag", key = "tag_double"}
|
||||
info_queue[#info_queue+1] = {set = "Tag", key = "tag_cry_quadruple", specific_vars = {3}}
|
||||
return { vars = {} }
|
||||
end,
|
||||
requires = { "v_cry_copies" },
|
||||
}
|
||||
local clone_machine = { --Double tags become Quintuple Tags and are 4X as common
|
||||
object_type = "Voucher",
|
||||
key = "clone_machine",
|
||||
atlas = "atlasvoucher",
|
||||
order = 91,
|
||||
pos = { x = 1, y = 3 },
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue+1] = {set = "Tag", key = "tag_double"}
|
||||
info_queue[#info_queue+1] = {set = "Tag", key = "tag_cry_quintuple", specific_vars = {4}}
|
||||
return { vars = {} }
|
||||
end,
|
||||
requires = { "v_cry_tag_printer" },
|
||||
}
|
||||
local command_prompt = { --Code cards can appear in the shop
|
||||
object_type = "Voucher",
|
||||
key = "command_prompt",
|
||||
atlas = "atlasvoucher",
|
||||
order = 3,
|
||||
pos = { x = 0, y = 1 },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = {} }
|
||||
end,
|
||||
redeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.code_rate = (G.GAME.code_rate or 0) + 4
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
unredeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.code_rate = math.max(0, G.GAME.code_rate - 4)
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
}
|
||||
local satellite_uplink = { --Code cards may appear in any of the Celestial Packs
|
||||
object_type = "Voucher",
|
||||
key = "satellite_uplink",
|
||||
atlas = "atlasvoucher",
|
||||
order = 4,
|
||||
pos = { x = 0, y = 2 },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = {} }
|
||||
end,
|
||||
requires = { "v_cry_command_prompt" },
|
||||
}
|
||||
local quantum_computing = { --Code cards can spawn with Negative addition
|
||||
object_type = "Voucher",
|
||||
key = "quantum_computing",
|
||||
order = 92,
|
||||
atlas = "atlasvoucher",
|
||||
pos = { x = 0, y = 3 },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = {} }
|
||||
end,
|
||||
requires = { "v_cry_satellite_uplink" },
|
||||
}
|
||||
local pairing = { --Retrigger all M Jokers if played hand is a Pair
|
||||
object_type = "Voucher",
|
||||
key = "pairing",
|
||||
atlas = "atlasvoucher",
|
||||
order = 5,
|
||||
pos = { x = 4, y = 5 },
|
||||
cry_credits = {
|
||||
jolly = {
|
||||
"Jolly Open Winner",
|
||||
"Xaltios",
|
||||
},
|
||||
},
|
||||
in_pool = function(self)
|
||||
local mcheck = get_m_jokers()
|
||||
if mcheck > 0 then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end,
|
||||
}
|
||||
local repair_man = { --Retrigger all M Jokers if played hand contains a pair
|
||||
object_type = "Voucher",
|
||||
key = "repair_man",
|
||||
atlas = "atlasvoucher",
|
||||
order = 6,
|
||||
pos = { x = 5, y = 5 },
|
||||
requires = { "v_cry_pairing" },
|
||||
cry_credits = {
|
||||
jolly = {
|
||||
"Jolly Open Winner",
|
||||
"Xaltios",
|
||||
},
|
||||
},
|
||||
in_pool = function(self)
|
||||
local mcheck = get_m_jokers()
|
||||
if mcheck > 0 then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end,
|
||||
}
|
||||
local pairamount_plus = { --Retrigger all M Jokers once for every pair contained in played hand
|
||||
object_type = "Voucher",
|
||||
key = "pairamount_plus",
|
||||
atlas = "atlasvoucher",
|
||||
order = 93,
|
||||
pos = { x = 6, y = 5 },
|
||||
requires = { "v_cry_repair_man" },
|
||||
cry_credits = {
|
||||
jolly = {
|
||||
"Jolly Open Winner",
|
||||
"Xaltios",
|
||||
},
|
||||
},
|
||||
in_pool = function(self)
|
||||
local mcheck = get_m_jokers()
|
||||
if mcheck > 0 then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end,
|
||||
}
|
||||
local double_vision = { --Double-Sided cards appear 4x more frequently
|
||||
object_type = "Voucher",
|
||||
key = "double_vision",
|
||||
order = 7,
|
||||
atlas = "atlasvoucher",
|
||||
pos = { x = 4, y = 3 },
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_double_sided
|
||||
end,
|
||||
cry_credits = {
|
||||
jolly = {
|
||||
"Jolly Open Winner",
|
||||
"Axolotolus",
|
||||
},
|
||||
},
|
||||
}
|
||||
local double_slit = { --Meld can appear in the shop and Arcana Packs
|
||||
object_type = "Voucher",
|
||||
key = "double_slit",
|
||||
atlas = "atlasvoucher",
|
||||
order = 8,
|
||||
pos = { x = 3, y = 4 },
|
||||
requires = { "v_cry_double_vision" },
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = G.P_CENTERS.c_cry_meld
|
||||
end,
|
||||
cry_credits = {
|
||||
jolly = {
|
||||
"Jolly Open Winner",
|
||||
"Axolotolus",
|
||||
},
|
||||
},
|
||||
}
|
||||
local double_down = { --After every round, X1.5 to all values on the back of Double-Sided Cards
|
||||
object_type = "Voucher",
|
||||
key = "double_down",
|
||||
atlas = "atlasvoucher",
|
||||
order = 94,
|
||||
pos = { x = 4, y = 4 },
|
||||
requires = { "v_cry_double_slit" },
|
||||
loc_vars = function(self, info_queue)
|
||||
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_double_sided
|
||||
end,
|
||||
cry_credits = {
|
||||
jolly = {
|
||||
"Jolly Open Winner",
|
||||
"Axolotolus",
|
||||
},
|
||||
},
|
||||
}
|
||||
local overstock_multi = { --+1 card slot[s] and +1 booster pack slot[s] available in the shop
|
||||
object_type = "Voucher",
|
||||
key = "overstock_multi",
|
||||
config = { extra = 1 },
|
||||
atlas = "atlasvoucher",
|
||||
order = 75,
|
||||
pos = { x = 4, y = 1 },
|
||||
requires = { "v_overstock_plus" },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { math.max(1, math.floor(self.config.extra)) } }
|
||||
end,
|
||||
redeem = function(self)
|
||||
if not G.GAME.modifiers.cry_booster_packs then
|
||||
G.GAME.modifiers.cry_booster_packs = 2
|
||||
end
|
||||
G.GAME.modifiers.cry_booster_packs = G.GAME.modifiers.cry_booster_packs
|
||||
+ math.max(1, math.floor(self.config.extra)) --Booster slots
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function() --card slot
|
||||
change_shop_size(math.max(1, math.floor(self.config.extra)))
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
unredeem = function(self)
|
||||
if not G.GAME.modifiers.cry_booster_packs then
|
||||
G.GAME.modifiers.cry_booster_packs = 2
|
||||
end
|
||||
G.GAME.modifiers.cry_booster_packs = G.GAME.modifiers.cry_booster_packs
|
||||
- math.max(1, math.floor(self.config.extra)) --Booster slots
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function() --card slot
|
||||
change_shop_size(math.min(-1, -1*math.floor(self.config.extra)))
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
}
|
||||
local massproduct = { --All cards and packs in the shop cost $1
|
||||
object_type = "Voucher",
|
||||
key = "massproduct",
|
||||
atlas = "atlasvoucher",
|
||||
order = 76,
|
||||
pos = { x = 6, y = 4 },
|
||||
requires = { "v_liquidation" },
|
||||
redeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.backup_discount_percent = G.GAME.backup_discount_percent or G.GAME.discount_percent
|
||||
G.GAME.discount_percent = 100
|
||||
for k, v in pairs(G.I.CARD) do
|
||||
if v.set_cost then
|
||||
v:set_cost()
|
||||
end
|
||||
end
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
unredeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.discount_percent = G.GAME.backup_discount_percent or 0
|
||||
for k, v in pairs(G.I.CARD) do
|
||||
if v.set_cost then
|
||||
v:set_cost()
|
||||
end
|
||||
end
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
}
|
||||
local curate = { --All cards appear with an Edition
|
||||
object_type = "Voucher",
|
||||
key = "curate",
|
||||
atlas = "atlasvoucher",
|
||||
order = 77,
|
||||
pos = { x = 6, y = 1 },
|
||||
requires = { "v_glow_up" },
|
||||
}
|
||||
local rerollexchange = { --All rerolls cost $2
|
||||
object_type = "Voucher",
|
||||
key = "rerollexchange",
|
||||
atlas = "atlasvoucher",
|
||||
order = 78,
|
||||
pos = { x = 6, y = 2 },
|
||||
requires = { "v_reroll_glut" },
|
||||
redeem = function(self)
|
||||
--most of the code for this (one line) is in cryptid.lua, check out the reroll function there
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
if G.GAME.current_round.reroll_cost > 2 then
|
||||
G.GAME.current_round.reroll_cost = 2
|
||||
end
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
unredeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
calculate_reroll_cost(true)
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
}
|
||||
--Order 79 reserved for celestial storage (unimplemented)
|
||||
local scope = { --Also unimplemented
|
||||
object_type = "Voucher",
|
||||
key = "scope",
|
||||
atlas = "atlasvoucher",
|
||||
order = 80,
|
||||
pos = { x = 2, y = 0 },
|
||||
requires = { "v_observatory" },
|
||||
}
|
||||
local dexterity = { --Permanently gain +2 hand[s] each round
|
||||
object_type = "Voucher",
|
||||
key = "dexterity",
|
||||
config = { extra = 2 },
|
||||
atlas = "atlasvoucher",
|
||||
order = 81,
|
||||
pos = { x = 6, y = 3 },
|
||||
requires = { "v_nacho_tong" },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { math.max(1, math.floor(self.config.extra)) } }
|
||||
end,
|
||||
redeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.round_resets.hands = G.GAME.round_resets.hands + math.max(1, math.floor(self.config.extra))
|
||||
ease_hands_played(math.max(1, math.floor(self.config.extra)))
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
unredeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.round_resets.hands = G.GAME.round_resets.hands - math.max(1, math.floor(self.config.extra))
|
||||
ease_hands_played(math.min(-1, -1*math.floor(self.config.extra)))
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
}
|
||||
local threers = { --Permanently gain +2 discard[s] each round
|
||||
object_type = "Voucher",
|
||||
key = "threers",
|
||||
config = { extra = 2 },
|
||||
atlas = "atlasvoucher",
|
||||
order = 82,
|
||||
pos = { x = 5, y = 0 },
|
||||
requires = { "v_recyclomancy" },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { math.max(1, math.floor(self.config.extra)) } }
|
||||
end,
|
||||
redeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.round_resets.discards = G.GAME.round_resets.discards + math.max(1, math.floor(self.config.extra))
|
||||
ease_discard(math.max(1, math.floor(self.config.extra)))
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
unredeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.round_resets.discards = G.GAME.round_resets.discards - math.max(1, math.floor(self.config.extra))
|
||||
ease_discard(math.min(-1, math.floor(-1*self.config.extra)))
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
}
|
||||
local tacclimator = { --Tarot cards appear X6 more frequently in the shop All future Tarot cards are free
|
||||
object_type = "Voucher",
|
||||
key = "tacclimator",
|
||||
config = { extra = 56 / 4, extra_disp = 6 }, --blame thunk for this extra value
|
||||
atlas = "atlasvoucher",
|
||||
order = 83,
|
||||
pos = { x = 1, y = 4 },
|
||||
requires = { "v_tarot_tycoon" },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { self.config.extra_disp } }
|
||||
end,
|
||||
redeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.tarot_rate = 4 * self.config.extra
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
unredeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.tarot_rate = G.GAME.tarot_rate / self.config.extra * (56/4) / 6
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
}
|
||||
local pacclimator = { --Planet cards appear X6 more frequently in the shop All future Planet cards are free
|
||||
object_type = "Voucher",
|
||||
key = "pacclimator",
|
||||
config = { extra = 56 / 4, extra_disp = 6 }, --blame thunk for this extra value
|
||||
atlas = "atlasvoucher",
|
||||
order = 84,
|
||||
pos = { x = 0, y = 4 },
|
||||
requires = { "v_planet_tycoon" },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { self.config.extra_disp } }
|
||||
end,
|
||||
redeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.planet_rate = 4 * self.config.extra
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
unredeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.planet_rate = G.GAME.planet_rate / self.config.extra * (56/4) / 6
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
}
|
||||
local moneybean = { --Raise the cap on interest earned in each round to $2.0e299
|
||||
object_type = "Voucher",
|
||||
key = "moneybean",
|
||||
config = { extra = 1e300 },
|
||||
atlas = "atlasvoucher",
|
||||
order = 85,
|
||||
pos = { x = 5, y = 1 },
|
||||
requires = { "v_money_tree" },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { self.config.extra / 5 } }
|
||||
end,
|
||||
redeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.interest_cap = self.config.extra
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
unredeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.interest_cap = math.max(25, (G.P_CENTERS.v_money_tree.config.extra or 0), (G.P_CENTERS.v_seed_money.config.extra or 0))
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
}
|
||||
local fabric = { --+2 Joker slot[s]
|
||||
object_type = "Voucher",
|
||||
key = "fabric",
|
||||
config = { extra = 2 },
|
||||
atlas = "atlasvoucher",
|
||||
order = 86,
|
||||
pos = { x = 6, y = 0 },
|
||||
requires = { "v_antimatter" },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { math.max(1, math.floor(self.config.extra)) } }
|
||||
end,
|
||||
redeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
if G.jokers then
|
||||
G.jokers.config.card_limit = G.jokers.config.card_limit + math.max(1, math.floor(self.config.extra))
|
||||
end
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
unredeem = function(self)
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
if G.jokers then
|
||||
G.jokers.config.card_limit = G.jokers.config.card_limit - math.max(1, math.floor(self.config.extra))
|
||||
end
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end,
|
||||
}
|
||||
--Order 87 reserved for Fake-out (unimplemented)
|
||||
local function asteroglyph_ante()
|
||||
if not (G.GAME or {}).modifiers then
|
||||
return 0
|
||||
end
|
||||
if not G.GAME.modifiers.cry_astero_ante then
|
||||
G.GAME.modifiers.cry_astero_ante = 0
|
||||
end
|
||||
return G.GAME.modifiers.cry_astero_ante
|
||||
end
|
||||
|
||||
local asteroglyph = { --Set Ante to 0
|
||||
object_type = "Voucher",
|
||||
key = "asteroglyph",
|
||||
atlas = "atlasvoucher",
|
||||
order = 88,
|
||||
pos = { x = 5, y = 2 },
|
||||
requires = { "v_petroglyph" },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { asteroglyph_ante() } }
|
||||
end,
|
||||
redeem = function(self)
|
||||
local mod = -G.GAME.round_resets.ante + asteroglyph_ante()
|
||||
ease_ante(mod)
|
||||
G.GAME.modifiers.cry_astero_ante = (G.GAME.modifiers.cry_astero_ante or 0) > 0
|
||||
and math.min(math.ceil(G.GAME.modifiers.cry_astero_ante ^ 1.13), 1e300)
|
||||
or 1
|
||||
G.E_MANAGER:add_event(Event({
|
||||
func = function()
|
||||
G.GAME.round_resets.blind_ante = mod
|
||||
return true
|
||||
end,
|
||||
}))
|
||||
end
|
||||
}
|
||||
--Order 89 reserved for Ivory Script (unimplemented)
|
||||
local blankcanvas = { --+2 hand size
|
||||
object_type = "Voucher",
|
||||
key = "blankcanvas",
|
||||
config = { extra = 2 },
|
||||
atlas = "atlasvoucher",
|
||||
order = 90,
|
||||
pos = { x = 2, y = 4 },
|
||||
requires = { "v_palette" },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { math.max(1, math.floor(self.config.extra)) } }
|
||||
end,
|
||||
redeem = function(self)
|
||||
G.hand:change_size(math.max(1, math.floor(self.config.extra)))
|
||||
end,
|
||||
unredeem = function(self)
|
||||
G.hand:change_size(-1*math.max(1, math.floor(self.config.extra)))
|
||||
end,
|
||||
}
|
||||
|
||||
local stickyhand = { --+1 card selection limit
|
||||
object_type = "Voucher",
|
||||
key = "stickyhand",
|
||||
config = { extra = 1 },
|
||||
atlas = "atlasvoucher",
|
||||
order = 9,
|
||||
pos = { x = 0, y = 5 },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { math.max(1, math.floor(self.config.extra)) } }
|
||||
end,
|
||||
redeem = function(self)
|
||||
G.hand.config.highlighted_limit = G.hand.config.highlighted_limit
|
||||
+ math.max(1, math.floor(self.config.extra))
|
||||
end,
|
||||
unredeem = function(self)
|
||||
G.hand.config.highlighted_limit = G.hand.config.highlighted_limit
|
||||
- math.max(1, math.floor(self.config.extra))
|
||||
if G.hand.config.highlighted_limit < 5 then G.hand.config.highlighted_limit = 5 end
|
||||
G.hand:unhighlight_all()
|
||||
end,
|
||||
}
|
||||
|
||||
local grapplinghook = { --+1 card selection limit (replace me when "extra functionality" is added later)
|
||||
object_type = "Voucher",
|
||||
key = "grapplinghook",
|
||||
config = { extra = 2 },
|
||||
atlas = "atlasvoucher",
|
||||
order = 10,
|
||||
pos = { x = 1, y = 5 },
|
||||
requires = { "v_cry_stickyhand" },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { math.max(1, math.floor(self.config.extra)) } }
|
||||
end,
|
||||
redeem = function(self)
|
||||
G.hand.config.highlighted_limit = G.hand.config.highlighted_limit
|
||||
+ math.max(1, math.floor(self.config.extra))
|
||||
end,
|
||||
unredeem = function(self)
|
||||
G.hand.config.highlighted_limit = G.hand.config.highlighted_limit
|
||||
- math.max(1, math.floor(self.config.extra))
|
||||
if G.hand.config.highlighted_limit < 5 then G.hand.config.highlighted_limit = 5 end
|
||||
G.hand:unhighlight_all()
|
||||
end,
|
||||
}
|
||||
|
||||
local hyperspacetether = { --+2 card selection limit (replace me when "extra functionality" is added later)
|
||||
object_type = "Voucher",
|
||||
key = "hyperspacetether",
|
||||
config = { extra = 2 },
|
||||
atlas = "atlasvoucher",
|
||||
pos = { x = 2, y = 5 },
|
||||
order = 95,
|
||||
requires = { "v_cry_grapplinghook" },
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { math.max(1, math.floor(self.config.extra)) } }
|
||||
end,
|
||||
redeem = function(self)
|
||||
G.hand.config.highlighted_limit = G.hand.config.highlighted_limit
|
||||
+ math.max(1, math.floor(self.config.extra))
|
||||
end,
|
||||
unredeem = function(self)
|
||||
G.hand.config.highlighted_limit = G.hand.config.highlighted_limit
|
||||
- math.max(1, math.floor(self.config.extra))
|
||||
if G.hand.config.highlighted_limit < 5 then G.hand.config.highlighted_limit = 5 end
|
||||
G.hand:unhighlight_all()
|
||||
end,
|
||||
}
|
||||
|
||||
|
||||
local triple = { --Copies voucher triple tag
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
name = "cry-Triple Tag",
|
||||
order = 20,
|
||||
pos = { x = 0, y = 1 },
|
||||
config = { type = "tag_add", num = 2 },
|
||||
key = "triple",
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { self.config.num } }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if
|
||||
context.type == "tag_add"
|
||||
and context.tag.key ~= "tag_double"
|
||||
and context.tag.key ~= "tag_cry_triple"
|
||||
and context.tag.key ~= "tag_cry_quadruple"
|
||||
and context.tag.key ~= "tag_cry_quintuple"
|
||||
and context.tag.key ~= "tag_cry_memory"
|
||||
then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
tag:yep("+", G.C.RED, function()
|
||||
if context.tag.ability and context.tag.ability.orbital_hand then
|
||||
G.orbital_hand = context.tag.ability.orbital_hand
|
||||
end
|
||||
for i = 1, tag.config.num do
|
||||
local tag = Tag(context.tag.key)
|
||||
if context.tag.key == "tag_cry_rework" then
|
||||
tag.ability.rework_edition = context.tag.ability.rework_edition
|
||||
tag.ability.rework_key = context.tag.ability.rework_key
|
||||
end
|
||||
add_tag(tag)
|
||||
end
|
||||
G.orbital_hand = nil
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
tag.triggered = true
|
||||
return true
|
||||
end
|
||||
end,
|
||||
in_pool = function()
|
||||
return G.GAME.used_vouchers.v_cry_copies
|
||||
end,
|
||||
}
|
||||
local quadruple = { --Tag printer voucher quadruple tag
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
name = "cry-Quadruple Tag",
|
||||
order = 21,
|
||||
pos = { x = 1, y = 1 },
|
||||
config = { type = "tag_add", num = 3 },
|
||||
key = "quadruple",
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { self.config.num } }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if
|
||||
context.type == "tag_add"
|
||||
and context.tag.key ~= "tag_double"
|
||||
and context.tag.key ~= "tag_cry_triple"
|
||||
and context.tag.key ~= "tag_cry_quadruple"
|
||||
and context.tag.key ~= "tag_cry_quintuple"
|
||||
and context.tag.key ~= "tag_cry_memory"
|
||||
then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
tag:yep("+", G.C.RED, function()
|
||||
if context.tag.ability and context.tag.ability.orbital_hand then
|
||||
G.orbital_hand = context.tag.ability.orbital_hand
|
||||
end
|
||||
for i = 1, tag.config.num do
|
||||
local tag = Tag(context.tag.key)
|
||||
if context.tag.key == "tag_cry_rework" then
|
||||
tag.ability.rework_edition = context.tag.ability.rework_edition
|
||||
tag.ability.rework_key = context.tag.ability.rework_key
|
||||
end
|
||||
add_tag(tag)
|
||||
end
|
||||
G.orbital_hand = nil
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
tag.triggered = true
|
||||
return true
|
||||
end
|
||||
end,
|
||||
in_pool = function()
|
||||
return G.GAME.used_vouchers.v_cry_tag_printer
|
||||
end,
|
||||
}
|
||||
local quintuple = { --Clone machine voucher quintuple tag
|
||||
object_type = "Tag",
|
||||
atlas = "tag_cry",
|
||||
name = "cry-Quintuple Tag",
|
||||
order = 22,
|
||||
pos = { x = 2, y = 1 },
|
||||
config = { type = "tag_add", num = 4 },
|
||||
key = "quintuple",
|
||||
loc_vars = function(self, info_queue)
|
||||
return { vars = { self.config.num } }
|
||||
end,
|
||||
apply = function(self, tag, context)
|
||||
if
|
||||
context.type == "tag_add"
|
||||
and context.tag.key ~= "tag_double"
|
||||
and context.tag.key ~= "tag_cry_triple"
|
||||
and context.tag.key ~= "tag_cry_quadruple"
|
||||
and context.tag.key ~= "tag_cry_quintuple"
|
||||
and context.tag.key ~= "tag_cry_memory"
|
||||
then
|
||||
local lock = tag.ID
|
||||
G.CONTROLLER.locks[lock] = true
|
||||
tag:yep("+", G.C.RED, function()
|
||||
if context.tag.ability and context.tag.ability.orbital_hand then
|
||||
G.orbital_hand = context.tag.ability.orbital_hand
|
||||
end
|
||||
for i = 1, tag.config.num do
|
||||
local tag = Tag(context.tag.key)
|
||||
if context.tag.key == "tag_cry_rework" then
|
||||
tag.ability.rework_edition = context.tag.ability.rework_edition
|
||||
tag.ability.rework_key = context.tag.ability.rework_key
|
||||
end
|
||||
add_tag(tag)
|
||||
end
|
||||
G.orbital_hand = nil
|
||||
G.CONTROLLER.locks[lock] = nil
|
||||
return true
|
||||
end)
|
||||
tag.triggered = true
|
||||
return true
|
||||
end
|
||||
end,
|
||||
in_pool = function()
|
||||
return G.GAME.used_vouchers.v_cry_clone_machine
|
||||
end,
|
||||
}
|
||||
-- If Tier 3 Vouchers is loaded, make Cryptid function as Tier 4 Vouchers
|
||||
if SMODS.Mods["Tier3Sub"] then
|
||||
overstock_multi.requires[#overstock_multi.requires + 1] = "v_overstock_three"
|
||||
massproduct.requires[#massproduct.requires + 1] = "v_money_mint"
|
||||
curate.requires[#curate.requires + 1] = "v_glow_in_dark"
|
||||
rerollexchange.requires[#rerollexchange.requires + 1] = "v_reroll_addict"
|
||||
dexterity.requires[#dexterity.requires + 1] = "v_applause"
|
||||
threers.requires[#threers.requires + 1] = "v_down_to_zero"
|
||||
tacclimator.requires[#tacclimator.requires + 1] = "v_tarot_factory"
|
||||
pacclimator.requires[#pacclimator.requires + 1] = "v_planet_factory"
|
||||
moneybean.requires[#moneybean.requires + 1] = "v_money_forest"
|
||||
fabric.requires[#fabric.requires + 1] = "v_neutral_particle"
|
||||
asteroglyph.requires[#asteroglyph.requires + 1] = "v_in_the_beginning"
|
||||
blankcanvas.requires[#blankcanvas.requires + 1] = "v_happy_accident"
|
||||
tacclimator.config.extra = tacclimator.config.extra * 8
|
||||
pacclimator.config.extra = pacclimator.config.extra * 8
|
||||
end
|
||||
|
||||
--Add T3 Voucher pool for Golden Voucher Tag (in Tags.lua) and maybe other things in the future
|
||||
--I am sorry in advance (this is extremely cursed)
|
||||
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_overstock_multi"
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_massproduct"
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_curate"
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_rerollexchange"
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_dexterity"
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_threers"
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_tacclimator"
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_pacclimator"
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_moneybean"
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_fabric"
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_asteroglyph"
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_blankcanvas"
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_hyperspacetether"
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_clone_machine"
|
||||
|
||||
if Cryptid.enabled["M Jokers"] then
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_pairamount_plus"
|
||||
end
|
||||
if Cryptid.enabled["Code Cards"] then
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_quantum_computing"
|
||||
end
|
||||
if Cryptid.enabled["Misc."] then
|
||||
Cryptid.Megavouchers[#Cryptid.Megavouchers + 1] = "v_cry_double_down"
|
||||
end
|
||||
|
||||
function megavoucherpool(_type, _rarity, legendary, key_append)
|
||||
G.ARGS.TEMP_POOL = EMPTY(G.ARGS.TEMP_POOL)
|
||||
local _pool, _starting_pool, _pool_key, _pool_size = G.ARGS.TEMP_POOL, {}, "megavoucher", 0
|
||||
|
||||
for k, v in pairs(Cryptid.Megavouchers) do
|
||||
if v then
|
||||
_starting_pool[#_starting_pool + 1] = G.P_CENTERS[v]
|
||||
end
|
||||
end
|
||||
|
||||
for k, v in ipairs(_starting_pool) do
|
||||
local add = false
|
||||
|
||||
if not G.GAME.cry_owned_vouchers[v.key] then
|
||||
local check = true
|
||||
if G.shop_vouchers and G.shop_vouchers.cards then
|
||||
for kk, vv in ipairs(G.shop_vouchers.cards) do
|
||||
if vv.config.center.key == v.key then check = false end
|
||||
end
|
||||
end
|
||||
if check then
|
||||
add = true
|
||||
end
|
||||
end
|
||||
|
||||
if add and not G.GAME.banned_keys[v.key] then
|
||||
_pool[#_pool + 1] = v.key
|
||||
_pool_size = _pool_size + 1
|
||||
end
|
||||
|
||||
if _pool_size == 0 then
|
||||
_pool = EMPTY(G.ARGS.TEMP_POOL)
|
||||
_pool[#_pool + 1] = "v_blank"
|
||||
end
|
||||
end
|
||||
|
||||
return _pool, _pool_key .. G.GAME.round_resets.ante
|
||||
end
|
||||
|
||||
local megavouchergetcurrentpool = get_current_pool
|
||||
function get_current_pool(_type, _rarity, _legendary, _append)
|
||||
if _type == "megavoucher" then
|
||||
return megavoucherpool(_type, _rarity, _legendary, _append)
|
||||
end
|
||||
return megavouchergetcurrentpool(_type, _rarity, _legendary, _append)
|
||||
end
|
||||
|
||||
function get_next_megavoucher_key(_from_tag)
|
||||
local _pool, _pool_key = get_current_pool('megavoucher')
|
||||
if _from_tag then _pool_key = 'Voucher_fromtag' end
|
||||
local center = pseudorandom_element(_pool, pseudoseed(_pool_key))
|
||||
local it = 1
|
||||
while center == 'UNAVAILABLE' do
|
||||
it = it + 1
|
||||
center = pseudorandom_element(_pool, pseudoseed(_pool_key..'_resample'..it))
|
||||
end
|
||||
|
||||
return center
|
||||
end
|
||||
|
||||
local voucheritems = {
|
||||
voucher_atlas,
|
||||
copies,
|
||||
tag_printer,
|
||||
triple,
|
||||
quadruple,
|
||||
quintuple,
|
||||
overstock_multi,
|
||||
massproduct,
|
||||
curate,
|
||||
rerollexchange,
|
||||
dexterity,
|
||||
threers,
|
||||
tacclimator,
|
||||
pacclimator,
|
||||
moneybean,
|
||||
fabric,
|
||||
asteroglyph,
|
||||
blankcanvas,
|
||||
clone_machine,
|
||||
stickyhand,
|
||||
grapplinghook,
|
||||
hyperspacetether
|
||||
}
|
||||
if Cryptid.enabled["Code Cards"] then
|
||||
voucheritems[#voucheritems + 1] = command_prompt
|
||||
voucheritems[#voucheritems + 1] = satellite_uplink
|
||||
voucheritems[#voucheritems + 1] = quantum_computing
|
||||
end
|
||||
if Cryptid.enabled["M Jokers"] then
|
||||
voucheritems[#voucheritems + 1] = pairing
|
||||
voucheritems[#voucheritems + 1] = repair_man
|
||||
voucheritems[#voucheritems + 1] = pairamount_plus
|
||||
end
|
||||
if Cryptid.enabled["Misc."] then
|
||||
voucheritems[#voucheritems + 1] = double_vision
|
||||
voucheritems[#voucheritems + 1] = double_slit
|
||||
voucheritems[#voucheritems + 1] = double_down
|
||||
end
|
||||
return {
|
||||
name = "Vouchers",
|
||||
init = function()
|
||||
--Curate
|
||||
local pe = poll_edition
|
||||
function poll_edition(_key, _mod, _no_neg, _guaranteed, _options)
|
||||
local ed = pe(_key, _mod, _no_neg, _guaranteed, _options)
|
||||
while not ed and G.GAME.used_vouchers.v_cry_curate do
|
||||
ed = pe(_key, _mod, _no_neg, _guaranteed, _options)
|
||||
end
|
||||
return ed
|
||||
end
|
||||
--Copies and upgrades
|
||||
local gcp = get_current_pool
|
||||
function get_current_pool(type, rarity, legendary, append, z)
|
||||
pool, pool_append = gcp(type, rarity, legendary, append, z)
|
||||
if type == "Tag" then
|
||||
for i = 1, #pool do
|
||||
if pool[i] == "tag_double" and G.GAME.used_vouchers.v_cry_copies then
|
||||
pool[i] = "tag_cry_triple"
|
||||
end
|
||||
if
|
||||
(pool[i] == "tag_double" or pool[i] == "tag_cry_triple")
|
||||
and G.GAME.used_vouchers.v_cry_tag_printer
|
||||
then
|
||||
pool[i] = "tag_cry_quadruple"
|
||||
end
|
||||
if
|
||||
(pool[i] == "tag_double" or pool[i] == "tag_cry_triple" or pool[i] == "tag_cry_quadruple")
|
||||
and G.GAME.used_vouchers.v_cry_clone_machine
|
||||
then
|
||||
pool[i] = "tag_cry_quintuple"
|
||||
end
|
||||
end
|
||||
end
|
||||
return pool, pool_append
|
||||
end
|
||||
local tinit = Tag.init
|
||||
function Tag:init(tag, y, z)
|
||||
if tag == "tag_double" and G.GAME.used_vouchers.v_cry_copies then
|
||||
tag = "tag_cry_triple"
|
||||
end
|
||||
if (tag == "tag_double" or tag == "tag_cry_triple") and G.GAME.used_vouchers.v_cry_tag_printer then
|
||||
tag = "tag_cry_quadruple"
|
||||
end
|
||||
if
|
||||
(tag == "tag_double" or tag == "tag_cry_triple" or tag == "tag_cry_quadruple")
|
||||
and G.GAME.used_vouchers.v_cry_clone_machine
|
||||
then
|
||||
tag = "tag_cry_quintuple"
|
||||
end
|
||||
return tinit(self, tag, y, z)
|
||||
end
|
||||
local sc = Card.set_cost
|
||||
function Card:set_cost()
|
||||
sc(self)
|
||||
if self.ability.set == "Tarot" and G.GAME.used_vouchers.v_cry_tacclimator then --Make Tarots free when Tarot Acclimator is redeemed
|
||||
self.cost = 0
|
||||
end
|
||||
if self.ability.set == "Planet" and G.GAME.used_vouchers.v_cry_pacclimator then --Make Planets free when Planet Acclimator is redeemed
|
||||
self.cost = 0
|
||||
end
|
||||
end
|
||||
end,
|
||||
items = voucheritems,
|
||||
}
|
3
Cryptid/Items/dummy_https.lua
Normal file
|
@ -0,0 +1,3 @@
|
|||
-- dummy file to add https option to mod menu
|
||||
return { name = "HTTPS Module" }
|
||||
-- someone should make a system for this, engineers are crying
|
4
Cryptid/Items/dummy_timerblinds.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
-- Dummy file, only here to add the timer blinds toggle to the menu
|
||||
--Jevonn was here [MMMMMMM]
|
||||
return { name = "Timer Mechanics" }
|
||||
-- ^^^ M spotted
|
60
Cryptid/README.md
Normal file
|
@ -0,0 +1,60 @@
|
|||
# Cryptid
|
||||
An unbalanced Balatro mod.
|
||||
|
||||
Note: Cryptid requires [Steamodded **1.0.0-Alpha**](https://github.com/Steamopollys/Steamodded/archive/refs/heads/main.zip) and [Talisman](https://github.com/MathIsFun0/Talisman/releases/latest).
|
||||
|
||||
Cryptid currently adds:
|
||||

|
||||

|
||||
|
||||
|
||||
### [Official Discord](https://discord.gg/eUf9Ur6RyB)
|
||||
|
||||
### [Video Installation Guide](https://www.youtube.com/watch?v=aUr0gXE77rk)
|
||||
|
||||
### Frequently asked questions
|
||||
* Credit to @jenwalter666 for creating this FAQ (forwarded from Cryptid Discord)
|
||||
|
||||
## General
|
||||
|
||||
> *My game is crashing on startup/something doesn't appear to be loading!*
|
||||
|
||||
Make sure everything is properly installed.
|
||||
For Talisman, the folder that contains Talisman should be named `Talisman`. If you've downloaded the source code from GitHub (by clicking on [Code] and then [Download ZIP]), the folder within the ZIP may be called `Talisman-main`, which will cause a problem. Simply rename the folder(s) so that the `-main` part of the name is removed, so that the folder is just called `Talisman`.
|
||||
Whenever you are manually updating Talisman or Cryptid, or any other mod for that matter, it's a good approach to instead delete the contents of the folder, then install the contents of the folder from the ZIP into the existing folder to avoid having to constantly rename the folder over and over.
|
||||
For automatic updates, try using the [automatic update script](https://discord.com/channels/1264429948970733782/1268911536638787625).
|
||||
It could also be that Steamodded is out of date, sometimes mods may use features of a new version that's absent in an older version, but don't change the version that they ask for.
|
||||
You can grab the latest Steamodded by [clicking here](https://github.com/Steamopollys/Steamodded/archive/refs/heads/main.zip).
|
||||
|
||||
> *I can't see any new jokers/content!*
|
||||
|
||||
If you've installed everything correctly, but no new jokers, blinds, etc. are ingame, check the Mods list by clicking on [MODS] in the main menu, and look for Cryptid/Talisman.
|
||||
If they show up red, that means there's a problem. Hover over the mod icon (which should be an exclamation mark) to see what said problem is. It could be an outdated dependency in most cases.
|
||||
|
||||
> *What's up with all the "M" jokers/references to Jolly Joker?*
|
||||
|
||||
"M" is a reference to an incident in the official Balatro Discord where a user named mjiojio was spamming the letter "m" in various channels. When asked what their least favourite joker was, they answered with Jolly Joker, and that's how the "M" joke became a thing!
|
||||
|
||||
> *There's some content in the mod I don't like! Is there any way to remove them?*
|
||||
|
||||
You can disable some features of the mod by opening your Settings, going over to the Spectral Pack tab, clicking [Cryptid], then checking/unchecking what you want.
|
||||
You can also enable/disable certain music tracks. If you're a streamer, consider disabling the Jimball music for your safety!
|
||||
|
||||
> *I'm hitting infinity very often, is there any way to raise the limit of the scoring system?*
|
||||
|
||||
Talisman may be configured to be on **BigNum** mode, which has a maximum limit of ee308. You can make the limit virtually disappear by changing it to **OmegaNum**, which can handle e10##1000. You can configure it the same way; going into Settings, then the Spectral Pack tab, then Talisman. Be careful; if you have a saved run that was on a different number system, you won't be able to load it (unless if you switch back)!
|
||||
|
||||
|
||||
> *I've experienced a crash/bug!*
|
||||
|
||||
Be sure to give us as much information about the bug/crash as possible. A way to reproduce the bug/crash is also especially useful information to help us fix it.
|
||||
Remember; just saying you're crashing doesn't tell us anything. We need to know the details!
|
||||
|
||||
> *How can I disable a specific boss blind/joker/etc.?*
|
||||
|
||||
Let's use Blinds as an example.
|
||||
|
||||
In your Balatro mods folder, navigate to `\Cryptid\Items` and find `Blinds.lua`. (Different types of items will be contained in different Lua files in this folder.)
|
||||
|
||||
Towards the end of the file, there's an array named `items_togo`, near line 1230. You can disable specific Blinds by deleting the relevant lines here. These settings will take effect on a restart.
|
||||
Most other files will have a similar items array near the bottom of the file that you can modify to remove specific things from Cryptid. This system will be changed to be in-game before Cryptid 0.6.0.
|
BIN
Cryptid/assets/1x/atlasSleeves.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
Cryptid/assets/1x/atlasdeck.png
Normal file
After Width: | Height: | Size: 126 KiB |
BIN
Cryptid/assets/1x/atlasepic.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
Cryptid/assets/1x/atlasexotic.png
Normal file
After Width: | Height: | Size: 128 KiB |
BIN
Cryptid/assets/1x/atlasnotjokers.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
Cryptid/assets/1x/atlasone.png
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
Cryptid/assets/1x/atlasspooky.png
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
Cryptid/assets/1x/atlasthree.png
Normal file
After Width: | Height: | Size: 178 KiB |
BIN
Cryptid/assets/1x/atlastwo.png
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
Cryptid/assets/1x/atlasvoucher.png
Normal file
After Width: | Height: | Size: 153 KiB |
BIN
Cryptid/assets/1x/b_cry_glowing.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
Cryptid/assets/1x/bl_cry.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
Cryptid/assets/1x/bl_nostalgia.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
Cryptid/assets/1x/c_cry_code.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
Cryptid/assets/1x/cry_achievements.png
Normal file
After Width: | Height: | Size: 4.7 KiB |
BIN
Cryptid/assets/1x/cry_icon.png
Normal file
After Width: | Height: | Size: 576 B |
BIN
Cryptid/assets/1x/cry_misc.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
Cryptid/assets/1x/goofy.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
Cryptid/assets/1x/j_cry_jimball.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
Cryptid/assets/1x/jolly.png
Normal file
After Width: | Height: | Size: 404 KiB |
BIN
Cryptid/assets/1x/pack_cry.png
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
Cryptid/assets/1x/placeholders.png
Normal file
After Width: | Height: | Size: 13 KiB |
25
Cryptid/assets/1x/resize.py
Normal file
|
@ -0,0 +1,25 @@
|
|||
import sys
|
||||
from PIL import Image
|
||||
import os
|
||||
import time
|
||||
|
||||
def upscale_pixel_art(input_image, output_directory, input_image_path):
|
||||
# Double the size
|
||||
new_size = (input_image.width * 2, input_image.height * 2)
|
||||
resized_image = input_image.resize(new_size, Image.NEAREST) # NEAREST resampling preserves pixelation
|
||||
|
||||
# Save the resized image
|
||||
filename = os.path.basename(input_image_path)
|
||||
output_image_path = os.path.join(output_directory, filename)
|
||||
resized_image.save(output_image_path)
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) < 2:
|
||||
print("Usage: py resize.py <input_image>")
|
||||
sys.exit(1)
|
||||
|
||||
input_image_path = sys.argv[1]
|
||||
input_image = Image.open(input_image_path)
|
||||
|
||||
output_directory = "../2x/"
|
||||
upscale_pixel_art(input_image, output_directory, input_image_path)
|
BIN
Cryptid/assets/1x/stake_cry.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
Cryptid/assets/1x/sticker_cry.png
Normal file
After Width: | Height: | Size: 9.3 KiB |
BIN
Cryptid/assets/1x/tag_cry.png
Normal file
After Width: | Height: | Size: 6.6 KiB |
BIN
Cryptid/assets/2x/atlasSleeves.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
Cryptid/assets/2x/atlasdeck.png
Normal file
After Width: | Height: | Size: 206 KiB |
BIN
Cryptid/assets/2x/atlasepic.png
Normal file
After Width: | Height: | Size: 75 KiB |
BIN
Cryptid/assets/2x/atlasexotic.png
Normal file
After Width: | Height: | Size: 127 KiB |
BIN
Cryptid/assets/2x/atlasnotjokers.png
Normal file
After Width: | Height: | Size: 171 KiB |
BIN
Cryptid/assets/2x/atlasone.png
Normal file
After Width: | Height: | Size: 157 KiB |
BIN
Cryptid/assets/2x/atlasspooky.png
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
Cryptid/assets/2x/atlasthree.png
Normal file
After Width: | Height: | Size: 320 KiB |
BIN
Cryptid/assets/2x/atlastwo.png
Normal file
After Width: | Height: | Size: 103 KiB |
BIN
Cryptid/assets/2x/atlasvoucher.png
Normal file
After Width: | Height: | Size: 242 KiB |
BIN
Cryptid/assets/2x/b_cry_glowing.png
Normal file
After Width: | Height: | Size: 46 KiB |
BIN
Cryptid/assets/2x/bl_cry.png
Normal file
After Width: | Height: | Size: 135 KiB |
BIN
Cryptid/assets/2x/bl_nostalgia.png
Normal file
After Width: | Height: | Size: 65 KiB |