Commit graph

20 commits

Author SHA1 Message Date
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
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
Zach H
8221d37bbe don't share PT 2015-07-05 23:11:26 -04:00
Matt Lowe
9c1e509a37 Fixed issue with non creature perms set to 0/0
The issue was that I had set the ctor to set the p/t to 0/0 rather than
-1/-1. This meant that when you join a game in progress (spec or
reconnect) the server would send the card value to the client as 0/0,
instead of -1/-1. The client has been coded so that if the toughness is
<0 then dont show it. 0/0 is instead shown.

We still need to look into cards with no p/t being set to a 0/1 as
@tooomm mentioned in anther issue. As it stands, this is more important
than that.
2015-04-26 00:57:31 +02:00
Matt Lowe
1356bbcd94 Fix for #1007 2015-04-22 16:53:07 +02:00
Matt Lowe
be2a5f4720 Creatures can now have power less than -1
Addresses issue from #934
2015-04-10 12:39:41 +02:00
arxanas
4e8ba699d2 Tabs to spaces. 2014-07-08 22:53:02 -04:00
Max-Wilhelm Bruker
7417236c3a preliminary AlwaysRevealTopCard support related to issue #31, server code cleanup (finally removed getGameState) 2012-03-31 21:47:30 +02:00
Max-Wilhelm Bruker
609e3fc41d converted SetCardAttr attr_name to enum 2012-01-02 20:20:31 +01:00
Max-Wilhelm Bruker
898623f1ba filter running games; minor server code cleanup 2011-07-03 16:45:52 +02:00
Max-Wilhelm Bruker
aa38733f03 fixed Server_Card::resetState 2011-06-27 14:50:07 +02:00
Max-Wilhelm Bruker
be7779a466 reset card p/t when empty string is sent 2011-03-12 20:43:12 +01:00
Max-Wilhelm Bruker
d05603f83b p/t changes 2011-02-16 18:34:46 +01:00
Max-Wilhelm Bruker
d4f600393f minor visual change, server crash fix, multiplayer leave/concede fixes 2011-02-15 22:50:16 +01:00
Max-Wilhelm Bruker
ec602aefe1 server crash and inconsistency fix 2010-11-23 02:07:56 +01:00
Max-Wilhelm Bruker
614f106304 arrows can target players; card attachment works 2010-07-17 18:24:14 +02:00
Max-Wilhelm Bruker
cbf201ed9b optionally destroy tokens on zone change; added multi arrows; card menu changes; arrow fixes; initial commit for attachCard code 2010-06-27 14:50:51 +02:00
Max-Wilhelm Bruker
49e3563386 improved token dialog 2010-06-18 21:04:28 +02:00
Max-Wilhelm Bruker
df7bcf179d set p/t, set annotation, multiple counters per card 2010-06-17 20:13:27 +02:00
Max-Wilhelm Bruker
1c2aa15b22 boom 2009-10-29 17:13:37 +01:00
Renamed from servatrice/src/card.cpp (Browse further)