summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-10-14 14:55:45 +0800
committerIru Cai <mytbk920423@gmail.com>2018-10-14 14:55:45 +0800
commit80a15f36046a0eae2b657627f0f0f8875e3eb40a (patch)
treef9d8632d3cc7a5d82c374d51738c8ca803364a88
parent961979382df9c6443d9bdc7bcdcaae6c76f40cfd (diff)
downloadrich4-80a15f36046a0eae2b657627f0f0f8875e3eb40a.tar.xz
price_up_card
-rw-r--r--csrc/cards.c46
1 files changed, 46 insertions, 0 deletions
diff --git a/csrc/cards.c b/csrc/cards.c
index bb5a650..8772e02 100644
--- a/csrc/cards.c
+++ b/csrc/cards.c
@@ -1323,6 +1323,52 @@ int black_card()
return ebx;
}
+int price_up_card()
+{
+ if (players[current_player].who_plays == 1) {
+ ebp = fcn.00446ae8(0xe0c0006);
+ } else {
+ ebp = fcn.0041e6f2(0);
+ }
+
+ if (ebp == 0)
+ return 0;
+
+ consume_a_card(current_player, 27);
+ int c = players[current_player].character;
+ player_say(current_player, 0, card_strings[c][0][26]);
+
+ if (ebp > 2000 && ebp < 4000) {
+ edi = ebp - 2000;
+ edi *= 0x34;
+ edi += dw_498e84;
+ ebx = dw_498e84 + 0x34;
+ for (int i = 1; i <= dw_498e98; i++) {
+ if (strcmp(edi+4, ebx+4) == 0) {
+ byte [ebx + 0x17] = 0x50;
+ }
+ ebx += 0x34;
+ }
+ if (players[current_player].who_plays == 1) {
+ player_action_2(0, 0, 1);
+ return ebp;
+ }
+ move_animation(0, players[current_player].xpos, players[current_player].ypos, word [edi], word [edi + 2], 100);
+ } else if (ebp > 4000 && ebp < 6000) {
+ eax = ebp - 4000;
+ eax *= 56;
+ ebx = dw_498e88 + eax;
+ byte [ebx + 0x1c] = 0x50;
+ if (players[current_player].who_plays == 1) {
+ player_action_2(0, 0, 1);
+ return ebp;
+ }
+ move_animation(0, players[current_player].xpos, players[current_player].ypos, word [ebx], word [ebx + 2], 100);
+ }
+ player_action_2(0, 0, 1);
+ return ebp;
+}
+
int tortoise_walking_card()
{
if (players[current_player].who_plays == 1) {