diff options
author | Iru Cai <mytbk920423@gmail.com> | 2018-09-29 22:47:55 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2018-09-29 22:47:55 +0800 |
commit | 4ffcc3a506df264518291531417f4fa2b74b4d12 (patch) | |
tree | 5790eec285ad585d3a19f7249c2ba4f05a8d9821 /csrc/cards.c | |
parent | 795f5da2fb3e361fe1f349fdb9a6cb593a26babc (diff) | |
download | rich4-4ffcc3a506df264518291531417f4fa2b74b4d12.tar.xz |
red card
Diffstat (limited to 'csrc/cards.c')
-rw-r--r-- | csrc/cards.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/csrc/cards.c b/csrc/cards.c index ab95820..0468018 100644 --- a/csrc/cards.c +++ b/csrc/cards.c @@ -1214,6 +1214,36 @@ int invite_god_card () return esi; } +const char use_rb_card[] = "\xb9\xef%s\xa8\xcf\xa5\xce%s\xa1I"; + +int red_card() +{ + int c = players[current_player].character; + char name[20], buf[128]; + + player_say(current_player, 0, card_strings[c][0][23]); + if (players[current_player].who_plays != 1) { + edx = eax = fcn.0041e6f2(0); + ebx = eax * 36; + byte [ebx + 0x496987] = 0x20; + fcn.00429040(edx + 1); + strcpy_without_spaces(name, dword [ebx + 0x496980]); + sprintf(buf, use_rb_card, name, cards_table[24].name_ptr); + fcn.00440cac(buf, 1500); + consume_a_card(current_player, 24); + return 1; + } else { + fcn.004021f8(12, 15, 10); + int selected_stock = stock_ui(1); + fcn.004021f8(41, 1, 0); + player_action_1(1); + if (selected_stock == 0) + return 0; + consume_a_card(current_player, 24); + return selected_stock; + } +} + int tortoise_walking_card() { if (players[current_player].who_plays == 1) { |