summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-10-16 21:05:23 +0800
committerIru Cai <mytbk920423@gmail.com>2018-10-16 21:05:23 +0800
commit76a157eb42133e4eb8f2bcd40f3ce6ed459375f7 (patch)
treed3ea945e64f2ed255e433304e831def61e243fd4
parentfced9cb0fbc653462342a85d9c8233255eb1cce5 (diff)
downloadrich4-76a157eb42133e4eb8f2bcd40f3ce6ed459375f7.tar.xz
invade_bank_computer
-rw-r--r--csrc/fortune.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/csrc/fortune.c b/csrc/fortune.c
index 4e598f7..812e840 100644
--- a/csrc/fortune.c
+++ b/csrc/fortune.c
@@ -314,6 +314,31 @@ void bank_reject_a_month(int a0)
}
}
+void invade_bank_computer(int a0)
+{
+ static const char *str_invade = "#0189\xabI\xa4J\xbb\xc8\xa6\xe6\xb9q\xb8\xa3\n"
+ "\xae\xbf\xa5\xce\xa8\xe4\xa5L\xa4H\xa6s\xb4\xda%d\xa2H";
+
+ char buf[128];
+
+ if (a0 == 0) {
+ dw_48c5b0 = 10;
+ sprintf(buf, str_invade, 10);
+ draw_some_text(fortune_panel + 0x18, buf, 24, 330, 0);
+ graph_st_overlay(fortune_panel + 0x18, [current_player * 0x34 + 0x498eb0] + 0x18, 390, 344);
+ } else {
+ float t1 = dw_48c5b0 / 100.0;
+ for (int i = 0; i < nplayers; i++) {
+ if (i != current_player
+ && players[i].who_plays != 0
+ && players[i].money_in_bank != 0) {
+ int t2 = trunc(players[i].money_in_bank * t1);
+ fcn.0041d2c6(i, current_player, t2, 4);
+ }
+ }
+ }
+}
+
void sell_all_the_stock(int a0)
{
static const char *str_sell = "#0194\xc5\xdc\xbd\xe6\xa9\xd2\xa6\xb3\xaa\xd1\xb2\xbc\xa8\x44\xb2{";