… | |
… | |
103 | cf::NDI_RED |
103 | cf::NDI_RED |
104 | ); |
104 | ); |
105 | # kill them. |
105 | # kill them. |
106 | # reminds me of the famous badness 10000 syndrome... |
106 | # reminds me of the famous badness 10000 syndrome... |
107 | $ob->stats->hp (-10000); #] if they survive this they deserved to live |
107 | $ob->stats->hp (-10000); #] if they survive this they deserved to live |
108 | my $killer = cf::arch::get "killer_login"; |
108 | my $killer = cf::arch::get "killer_login"; $pl->killer ($killer); $killer->destroy; |
109 | $pl->killer ($killer); |
|
|
110 | $killer->destroy; |
|
|
111 | } else { |
109 | } else { |
112 | ($map, $x, $y) = $pl->savebed; |
110 | ($map, $x, $y) = $pl->savebed; |
113 | |
111 | |
114 | $ob->message ( |
112 | $ob->message ( |
115 | "You didn't use a bed to reality to leave this realm, leaving your body in great danger. " |
113 | "You didn't use a bed to reality to leave this realm, leaving your body in great danger. " |
… | |
… | |
400 | |
398 | |
401 | $pl->chargen_race_next; |
399 | $pl->chargen_race_next; |
402 | Coro::Timer::sleep 0.2; |
400 | Coro::Timer::sleep 0.2; |
403 | } |
401 | } |
404 | |
402 | |
|
|
403 | # create the playerdir, if necessary, as chargen_race_done did it before |
|
|
404 | # presumably because of unique maps |
|
|
405 | aio_mkdir playerdir $pl, 0770; |
405 | $pl->chargen_race_done; |
406 | $pl->chargen_race_done; |
406 | |
407 | |
407 | while () { |
408 | while () { |
408 | my $res = query $ns, cf::CS_QUERY_SINGLECHAR, |
409 | my $res = query $ns, cf::CS_QUERY_SINGLECHAR, |
409 | "Now choose a gender.\nPress 'f' to become female, and 'm' to become male.\n"; |
410 | "Now choose a gender.\nPress 'f' to become female, and 'm' to become male.\n"; |
… | |
… | |
467 | |
468 | |
468 | # update respawn position |
469 | # update respawn position |
469 | $pl->savebed ($bed->map->path, $bed->x, $bed->y); |
470 | $pl->savebed ($bed->map->path, $bed->x, $bed->y); |
470 | cf::async { $pl->save }; |
471 | cf::async { $pl->save }; |
471 | |
472 | |
472 | my $killer = cf::arch::get "killer_logout"; |
473 | my $killer = cf::arch::get "killer_logout"; $pl->killer ($killer); $killer->destroy; |
473 | $pl->killer ($killer); |
|
|
474 | $killer->destroy; |
|
|
475 | $ob->check_score; |
474 | $ob->check_score; |
476 | |
475 | |
477 | $ob->reply (undef, "In the future, you will wake up here when you die."); |
476 | $ob->reply (undef, "In the future, you will wake up here when you die."); |
478 | |
477 | |
479 | $pl->ns->query (cf::CS_QUERY_SINGLECHAR, "Do you want to continue playing (y/n)?", sub { |
478 | $pl->ns->query (cf::CS_QUERY_SINGLECHAR, "Do you want to continue playing (y/n)?", sub { |