Commit graph

126 commits

Author SHA1 Message Date
ebbit1q
994704d353
implement max lengths for input dialogs that are sent to the server (#4522)
* implement max lengths for input dialogs that are sent to the server

* missed a double setMaxLength

* implement max string lengths server side

* add custom getText dialog with max length

* fix deck storage tab and miscellaneous server side

* add max size for deck uploads

* final pass on client side limits
2022-01-16 17:57:01 -05:00
ebbit1q
811ee54c76
Fix move (#4491)
* wip fix card moving on server

* fix flipped cards being moved as -1

* fix cards from hand being moved as -1
2021-12-07 22:56:58 -05:00
ZeldaZach
8b1daa21ef Revert "fix card moving on server (#4413)"
This reverts commit c25bf491e4.
2021-11-15 00:54:21 -05:00
ebbit1q
c25bf491e4
fix card moving on server (#4413)
* wip fix card moving on server

* fix flipped cards being moved as -1
2021-09-14 15:48:46 -04:00
ebbit1q
0280fea3e6
apply chat flood prevention in games next to rooms (#4387)
* apply chat flood prevention in games next to rooms

* add limit to private messages as well
2021-06-28 01:57:46 -04:00
ebbit1q
ebe2c494aa
remove the stop dump zone command from the protocol (#4326)
the stop dump zone command was implemented as a courtesy to other
players in order to take into account when they would stop looking at
unknown information

however, this can be abused, a malicious client can send this command
whenever they would like

cockatrice is not a physical tabletop nor does it aim to be, if you can
take a screenshot of your deck and then close the view, you are not
cheating as you have been given this information

in order to prevent anyone from abusing this we should remove the
command from the protocol, this means servers will ignore this message
and clients will get a little invalid command reply in their debug log

the extension id will remain reserved

shuffling your deck will always invalidate any card view looking at
those cards

if players wish to signal that they stopped looking at their deck for
whatever reason they should just use the chat instead, optionally using
one of the chat macros
2021-06-01 21:52:20 -04:00
omegaula
073349fd05
Always look at top card (#4238)
* Add option to always look at top card of deck

Similar to "always reveal", but reveals card only to the owner,
not all players.

* Add option to always look at top card of deck

Similar to "always reveal", but reveals card only to the owner,
not all players.

* Update bug_report.md (#4246)

* Update bug_report.md

* reproduction steps

* Update to address review comments

* Clangify

* set playerId on dumpEvent

Co-authored-by: tooomm <tooomm@users.noreply.github.com>
Co-authored-by: ebbit1q <ebbit1q@gmail.com>
Co-authored-by: Zach H <zahalpern+github@gmail.com>
2021-03-13 14:54:13 -05:00
ebbit1q
1811f7305e
only invalidate undoDrawList up to moved card (#4280) 2021-03-13 14:41:09 -05:00
ebbit1q
401fdcaf7a
move changing x coord to after check for token deletion (#4236)
fixes #4235
reverts #4216
2021-01-30 16:44:12 -05:00
knitknit
a0deb73df6
Fix #2771: Do not change x coordinates of moved card if it will be destroyed when it leaves the table (#4216) 2021-01-02 22:45:11 -05:00
knitknit
8e9d4e3a67
Retain lastDrawList if a card is being moved within hand, e.g. hand reordering only. (#4152) 2020-11-01 15:02:17 -05:00
Zach H
bec02b4952
Judges can talk in games (#4091) 2020-09-09 13:20:59 -04:00
ebbit1q
18a07274d4
clangify everything with the new header sorting (#3908) 2020-03-18 17:36:02 -04:00
ctrlaltca
b6df5a4ac3 Deal with recent Qt methods deprecation (#3801)
* Deal with recent Qt methods deprecation

 * Use std::sort, std::less instead of qSort/qLess
 * Use QFontMetrics::horizontalAdvance instead of ::width
 * Use qApp->primaryScreen() instead of QDesktopWidget
 * use lambas instead of QSignalMapper
 * Use QTreeWidgetItem::setForeground instead of ::setTextColor
 * Use QDir::setPath instead of operator=(QString)
 * Use QList::swapItemsAt instead of ::swap

* fix error
2019-08-27 20:06:54 -04:00
ctrlaltca
f54165025e Add a new command to reverse turn order (#3802) 2019-08-27 20:04:27 -04:00
ebbit1q
a3a1e20074 replace old mulligan with new behavior (#3773) 2019-07-11 22:53:09 -04:00
ebbit1q
abe4f5ca60 don't remove pt! 🔥🔥🔥🔥 (#3606)
* don't remove pt! 🔥🔥🔥🔥

* apply water to burns

* clangify

* fix clientside

* clangify

* missed qdebug

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>
2019-03-04 00:55:54 -05:00
ebbit1q
9411396b97 rework pt setting (#3584)
* rework pt setting

save pt as a string serverside
set the pt of cards that enter the battlefield to empty (was -1/0)
implement old behaviour as changePT clientside
display old pt to messagelog
add new keybind for new set behaviour (default ctrl+shift+p)
add flow pt actions and keybinds that increase while decreasing
put more braces everywhere
various refactors like adding consts and for loops
remove a single superfluous semicolon
does not change the way pt is displayed client side
does not fix 3455 fully

* fix drawing of pt

remove search for / in carditem's paint() (crash)
ptstring is now always orange unless it's a faceup card with a pt that
matches the cardinfo pt
set changept to remove the pt if the field is empty
set changept to keep the old value if one side is empty
return in changept for +0/+0
clean up some if statements

* return on change to +0/+0

* change log message for empty original pts

* typo

* remove changept

add parsept to unify reading pt strings
change setpt behavior to be an "upgraded" version of the old setpt
add arbitrary strings as anything that starts with /

* clangify

* remove debug lines

* add tip of the day

* add missing images

* clangify
2019-03-03 16:24:57 -05:00
Rob Blanckaert
ea8201af5c Judge mode (#3531)
* Judge mode

* Use seperate judge icon

* Fix clang init ordering complaint

* Create gavel.svg

* Add judge level

* Adjust judge permissions.

* - Tag events caused by judges
- Allow judges access to card right click menus.

* Allow judges to  change phase / turn.

* Remove gavel from pawn

* Make judge action text black.

* Create scales

* Rename scales to scales.svg

* Use scales

* remove gavel

* - Address PR feedback
- Fix sort order

* Zach

* add option to servatrice.ini
2019-02-21 14:00:00 -05:00
Rob Blanckaert
d49ec0088f Fix shuffle (#3578) 2019-02-10 21:06:30 -05:00
Rob Blanckaert
d932581f4a Move to bottom of library in random order. (#3549)
* - Allow shuffling a subset of a zone
- When moving cards to the bottom of library, shuffle them after
- Process events in the correct order serverside

* Zach fixes

Signed-off-by: Zach Halpern <ZaHalpern+github@gmail.com>

* Comments + additional guard
2019-02-07 14:08:44 -05:00
Rob Blanckaert
a719e3b306 Log number of cards revealed to other players. (#3555) 2019-02-05 02:33:11 -05:00
Rob Blanckaert
7cd9b9c0c8 Unconcede (#3515) 2019-01-27 12:50:41 -05:00
David Szabo
281e52eaa9 power and toughness values displayed after card flip (#3120) 2018-03-01 12:28:30 -05:00
ctrlaltca
e127cb74b6 Fixed most issues from codacy (#3050) 2018-01-27 13:31:44 -05:00
ctrlaltca
b29bd9e070
Clang-format (#3028)
* 1/3 Add .clang-format file and travis compilation check

* 2/3 Run clang-format

* 3/3 Fix compilation problems due to include reordering

* 3bis/3 AfterControlStatement: false
2018-01-27 10:41:32 +01:00
Fabio Bas
36f6907fa3 Improved token loading 2017-05-04 23:28:51 -04:00
ctrlaltca
b20c60e603 fix #2332 (#2650) 2017-04-29 12:21:37 +02:00
Zach H
12c9e4b81a allow placement below top X cards (#2666)
Close #2666
2017-04-27 20:32:24 -04:00
Fabio Bas
2c551bdd35 Revert "fix #2332"
This reverts commit 0fd77346df.
2017-04-25 19:35:07 +02:00
Fabio Bas
0fd77346df fix #2332 2017-04-25 18:58:01 +02:00
ctrlaltca
29904c49da Specify reason when on game leave; fix #2624 (#2633)
* fix #2624

* feedback++
2017-04-24 22:20:08 +02:00
Fabio Bas
8826908923 Automatically attach related cards to the original card 2015-06-13 15:40:59 +02:00
ctrlaltca
25f444a5af Merge pull request #1051 from poixen/reveal_top_x
Reveal top x cards
2015-05-16 18:20:56 +02:00
Matt Lowe
59c0834427 Reveal top x cards
Updated reveal top card to reveal top x cards
Sometimes you want to reveal more than only the top 1 card.
2015-05-04 10:49:49 +02:00
Matt Lowe
33fa3ae032 Fixed revealing top card bug
Previously if you were to reveal the top card, then look at the top x (x
> 1) cards, then move them to another zone, the top card would stop
being revealed.

The issue was that when moving the cards the first card was being
revealed, then being moved.

I have also fixed an issue too:
+ reveal top card
+ scry 4
+ grab all cards and move to the first column of available space at the
left most of the screen (column 0). Everything is fine.
+ now try with another column (> 0), you will see that the card order
has flipped.

This no longer happens.

This needs some testing before being merged. I will run the build for a
while, right now it feels good though.
2015-05-02 17:25:41 +02:00
Matt Lowe
9a36ac8035 Added colored storm counter 2015-04-19 18:14:29 +02:00
Fabio Bas
dcc6677e8f fix #884 2015-04-01 23:04:10 +02:00
Fabio Bas
c72ddcfaed Tabs -> spaces 2015-02-22 20:07:47 +01:00
Fabio Bas
a7b8934a1b Fix remaining issues 2015-02-22 20:02:58 +01:00
Fabio Bas
925b4a83b0 Fix "sender id" and "ip address" fields in game 2015-01-01 16:20:57 +01:00
Fabio Bas
c875054fb5 Log messages from rooms, games and chats 2014-12-13 18:43:59 +01:00
Fabio Bas
3102dd60f9 Hide unused parameters in common/ to avoid warnings 2014-07-24 18:09:28 +02:00
arxanas
4e8ba699d2 Tabs to spaces. 2014-07-08 22:53:02 -04:00
Daenyth
4c2a553f03 Have servatrice inform players of sideboard size
Ref #142
2014-06-28 00:36:43 -04:00
Mark Morschhäuser
ccab97ca7d RNG: added additional checks (which forced an interface redesign), updated comments 2014-06-09 13:31:21 +02:00
Max-Wilhelm Bruker
9f13254d01 don't allow players to move cards that are attached to something 2013-02-03 18:23:54 +01:00
Max-Wilhelm Bruker
6807bb0bd7 server crash fix 2013-01-28 13:40:42 +01:00
Max-Wilhelm Bruker
14287e54f9 server crash fix 2013-01-26 16:08:42 +01:00
Max-Wilhelm Bruker
60a1f5d7d1 Server_CardZone::getFreeGridColumn() now runs in O(log n), which should remove the performance bottleneck when processing insertCard(x = -1) commands on a large zone, e.g. createToken 2013-01-20 16:40:15 +01:00