Skip to content

Commit e85f412

Browse files
authored
Various otaku/matrix things (luciensadi#798)
* Fix _update_living_persona overriding room IO limit * With a living persona, show proxy deck values for storage in prompt * Let living persona condition reflect mental condition * Hint forms command when an otaku attempts "design <form>" * Hint syntax for decrypting a SAN * Improve hints for decrypting SANs, designing complex forms. * Fix matrix initiative * Add otaku path to score
1 parent 0a963c5 commit e85f412

5 files changed

Lines changed: 49 additions & 24 deletions

File tree

src/act.informative.cpp

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5143,8 +5143,15 @@ ACMD(do_score)
51435143
strlcat(mage_string, "Physical Adept", sizeof(mage_string));
51445144
break;
51455145
default:
5146-
if (IS_OTAKU(ch)) strlcat(mage_string, "Otaku", sizeof(mage_string));
5147-
else strlcat(mage_string, "Mundane", sizeof(mage_string));
5146+
if (IS_OTAKU(ch)) {
5147+
if (GET_OTAKU_PATH(ch) == OTAKU_PATH_NORMIE) {
5148+
strlcat(mage_string, "Otaku path missing, contact staff", sizeof(mage_string));
5149+
} else {
5150+
strlcat(mage_string, (GET_OTAKU_PATH(ch) == OTAKU_PATH_CYBERADEPT) ? "Cyberadept Otaku" : "Technoshaman Otaku", sizeof(mage_string));
5151+
}
5152+
} else {
5153+
strlcat(mage_string, "Mundane", sizeof(mage_string));
5154+
}
51485155
break;
51495156
}
51505157

src/comm.cpp

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,17 +1446,17 @@ int make_prompt(struct descriptor_data * d)
14461446
case 'D':
14471447
snprintf(str, sizeof(str), "%d", GET_BODY_POOL(d->character));
14481448
break;
1449-
case 'e':
1449+
case 'e': // persona active memory
14501450
if (ch->persona)
14511451
snprintf(str, sizeof(str), "%d", ch->persona->decker->active);
14521452
else
1453-
snprintf(str, sizeof(str), "0");
1453+
snprintf(str, sizeof(str), "NA");
14541454
break;
14551455
case 'E':
14561456
if (ch->persona && ch->persona->decker->deck)
1457-
snprintf(str, sizeof(str), "%d", GET_OBJ_VAL(ch->persona->decker->deck, 2));
1457+
snprintf(str, sizeof(str), "%d", GET_CYBERDECK_ACTIVE_MEMORY(ch->persona->decker->deck));
14581458
else
1459-
snprintf(str, sizeof(str), "0");
1459+
snprintf(str, sizeof(str), "NA");
14601460
break;
14611461
case 'f':
14621462
snprintf(str, sizeof(str), "%d", GET_CASTING(d->character));
@@ -1566,17 +1566,23 @@ int make_prompt(struct descriptor_data * d)
15661566
strlcpy(str, get_ch_domain_str(ch, TRUE), sizeof(str));
15671567
}
15681568
break;
1569-
case 'r':
1569+
case 'r': // persona storage memory
15701570
if (ch->persona && ch->persona->decker->deck)
1571-
snprintf(str, sizeof(str), "%d", GET_OBJ_VAL(ch->persona->decker->deck, 3) - GET_OBJ_VAL(ch->persona->decker->deck, 5));
1571+
if (ch->persona->type == ICON_LIVING_PERSONA && ch->persona->decker->proxy_deck)
1572+
snprintf(str, sizeof(str), "%d", GET_CYBERDECK_FREE_STORAGE(ch->persona->decker->proxy_deck));
1573+
else
1574+
snprintf(str, sizeof(str), "%d", GET_CYBERDECK_FREE_STORAGE(ch->persona->decker->deck));
15721575
else
1573-
snprintf(str, sizeof(str), "0");
1576+
snprintf(str, sizeof(str), "NA");
15741577
break;
15751578
case 'R':
15761579
if (ch->persona && ch->persona->decker && ch->persona->decker->deck)
1577-
snprintf(str, sizeof(str), "%d", GET_OBJ_VAL(ch->persona->decker->deck, 3));
1580+
if (ch->persona->type == ICON_LIVING_PERSONA && ch->persona->decker->proxy_deck)
1581+
snprintf(str, sizeof(str), "%d", GET_CYBERDECK_TOTAL_STORAGE(ch->persona->decker->proxy_deck));
1582+
else
1583+
snprintf(str, sizeof(str), "%d", GET_CYBERDECK_TOTAL_STORAGE(ch->persona->decker->deck));
15781584
else
1579-
snprintf(str, sizeof(str), "0");
1585+
snprintf(str, sizeof(str), "NA");
15801586
break;
15811587
case 's': // current ammo
15821588
if (GET_EQ(d->character, WEAR_HOLD) && WEAPON_IS_GUN(GET_EQ(d->character, WEAR_HOLD)))

src/newmatrix.cpp

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -251,19 +251,21 @@ void roll_matrix_init(struct matrix_icon *icon)
251251
int init_dice = 1;
252252
if (icon->decker && icon->decker->ch)
253253
{
254-
// Matrix pg 18 & 24, available bonuses are response increase, reality filter, and hot asist
255-
init_dice += GET_INIT_DICE(icon->decker->ch) + icon->decker->response + (icon->decker->reality ? 1 : 0) + (icon->decker->asist[0] ? 1 : 0);
256-
257254
if (icon->type == ICON_LIVING_PERSONA) {
258-
init_dice = MIN(5, init_dice + GET_ECHO(icon->decker->ch, ECHO_OVERCLOCK));
255+
// Matrix pg 138 & 145, 4 dice with a possible +1 from overclock
256+
init_dice = 4 + (GET_ECHO(icon->decker->ch, ECHO_OVERCLOCK) ? 1 : 0);
257+
// This is the living persona's matrix reaction, not response increase
258+
icon->initiative = icon->decker->response;
259+
} else {
260+
// Matrix pg 18 & 24, available bonuses are response increase, reality filter, and hot asist
261+
init_dice += icon->decker->response + (icon->decker->reality ? 1 : 0) + (icon->decker->asist[0] ? 1 : 0);
262+
icon->initiative = GET_REA(icon->decker->ch) + (icon->decker->response * 2) + (icon->decker->reality ? 2 : 0) + (icon->decker->asist[0] ? 2 : 0);
259263
}
260264

261265
// Apply Matrix 'trode net cap (max init dice 2d6)
262266
if (GET_EQ(icon->decker->ch, WEAR_HEAD) && IS_OBJ_STAT(GET_EQ(icon->decker->ch, WEAR_HEAD), ITEM_EXTRA_TRODE_NET)) {
263267
init_dice = MIN(init_dice, 2);
264268
}
265-
266-
icon->initiative = GET_REA(icon->decker->ch) + (icon->decker->response * 2) + (icon->decker->reality ? 2 : 0) + (icon->decker->asist[0] ? 2 : 0);
267269
} else
268270
{
269271
icon->initiative = icon->ic.rating;
@@ -564,12 +566,12 @@ bool do_damage_persona(struct matrix_icon *targ, int dmg)
564566
{
565567
if (targ->type == ICON_LIVING_PERSONA) {
566568
// It's an otaku! They get to suffer MENTAL DAMAGE!
567-
// targ->condition seems to be 1-10 scale, while ch mental wounds seems to be 1-100. Multiply by ten.
568-
569569
// damage() returns TRUE if the target has been deleted from memory, so when this function returns true, we must bail out of everything immediately.
570570
if (damage(targ->decker->ch, targ->decker->ch, dmg, TYPE_BLACKIC, MENTAL))
571571
return TRUE;
572572

573+
// targ->condition is 0-10 scale, while ch mental wounds is 0-100.
574+
targ->condition = GET_MENTAL(targ->decker->ch) / 10;
573575
return FALSE;
574576
}
575577
targ->condition -= dmg;
@@ -1474,9 +1476,11 @@ ACMD(do_matrix_score)
14741476
" Masking:^B%3d^n Sensors:^B%3d^n\r\n"
14751477
" ^cDeck Status:^n\r\n"
14761478
" Hardening:^g%3d^n MPCP:^g%3d^n\r\n"
1477-
" IO Speed:^g%4d^n Response Increase:^g%3d^n\r\n",
1479+
" IO Speed:^g%4d^n %s:^g%3d^n\r\n",
14781480
DECKER->bod, DECKER->evasion, DECKER->masking, DECKER->sensor,
1479-
DECKER->hardening, DECKER->mpcp, DECKER->deck ? GET_CYBERDECK_IO_RATING(DECKER->deck) : 0, DECKER->response);
1481+
DECKER->hardening, DECKER->mpcp, DECKER->deck ? GET_CYBERDECK_IO_RATING(DECKER->deck) : 0,
1482+
(ch->persona->type == ICON_LIVING_PERSONA) ? "Matrix Reaction" : "Response Increase",
1483+
DECKER->response);
14801484
}
14811485

14821486
if (HAS_HITCHER_JACK(DECKER->deck)) {
@@ -2925,7 +2929,9 @@ ACMD(do_decrypt)
29252929

29262930
// If there's nothing to decrypt, there's nothing to succeed at.
29272931
if (!matrix[PERSONA->in_host].stats[mode][MTX_STAT_ENCRYPTED]) {
2928-
send_to_icon(PERSONA, "The %s subsystem doesn't seem to be encrypted.\r\n", mtx_subsystem_names[mode]);
2932+
send_to_icon(PERSONA, "The local %s subsystem doesn't seem to be encrypted.\r\n", mtx_subsystem_names[mode]);
2933+
if (PRF_FLAGGED(ch, PRF_SEE_TIPS) && (mode == ACIFS_ACCESS))
2934+
send_to_icon(PERSONA, "[OOC: To decrypt a remote host's SAN, try ^WDECRYPT <HOST>^n.]\r\n");
29292935
return;
29302936
}
29312937

src/otaku.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ void _update_living_persona(struct char_data *ch, struct obj_data *cyberdeck, in
240240
ch->persona->decker->mpcp = mpcp;
241241
ch->persona->decker->hardening = GET_CYBERDECK_HARDENING(cyberdeck);
242242
ch->persona->decker->response = GET_CYBERDECK_RESPONSE_INCREASE(cyberdeck);
243-
ch->persona->decker->io = GET_CYBERDECK_IO_RATING(cyberdeck);
244243

245244
for (struct obj_data *part = cyberdeck->contains; part; part = part->next_content) {
246245
if (GET_OBJ_TYPE(part) != ITEM_PART) continue;
@@ -272,6 +271,7 @@ void update_otaku_deck(struct char_data *ch, struct obj_data *cyberdeck) {
272271
GET_CYBERDECK_HARDENING(cyberdeck) = MIN(get_otaku_wil(ch), GET_CYBERDECK_HARDENING(cyberdeck));
273272
GET_CYBERDECK_ACTIVE_MEMORY(cyberdeck) = 0; // Otaku do not have active memory.
274273
GET_CYBERDECK_TOTAL_STORAGE(cyberdeck) = 0;
274+
// Otaku don't have response increase, so use this for matrix reaction instead
275275
GET_CYBERDECK_RESPONSE_INCREASE(cyberdeck) = get_otaku_rea(ch) + GET_ECHO(ch, ECHO_IMPROVED_REA);
276276
GET_CYBERDECK_RESPONSE_INCREASE(cyberdeck) = MIN(mpcp * 1.5, GET_CYBERDECK_RESPONSE_INCREASE(cyberdeck));
277277
GET_CYBERDECK_IO_RATING(cyberdeck) = (get_otaku_int(ch) * 100) + (GET_ECHO(ch, ECHO_IMPROVED_IO) * 100);

src/pro_create.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ struct obj_data *can_program(struct char_data *ch)
233233
else {
234234
for (struct char_data *vict = ch->in_veh ? ch->in_veh->people : ch->in_room->people; vict; vict = vict->next_in_room)
235235
if (AFF_FLAGS(vict).AreAnySet(AFF_PROGRAM, AFF_DESIGN, ENDBIT)) {
236-
send_to_char(ch, "Someone is already using the computer.\r\n");
236+
send_to_char("Someone is already using the computer.\r\n", ch);
237237
return NULL;
238238
}
239239
FOR_ITEMS_AROUND_CH(ch, comp)
@@ -243,6 +243,9 @@ struct obj_data *can_program(struct char_data *ch)
243243
comp = NULL;
244244
if (!comp) {
245245
send_to_char(ch, "There is no computer here for you to use.\r\n");
246+
// A computer isn't used to design a complex form, but we use a different command for that
247+
if (PRF_FLAGGED(ch, PRF_SEE_TIPS) && IS_OTAKU(ch))
248+
send_to_char("[OOC: To learn a complex form, try ^WFORMS LEARN <FORM>^n.]\r\n", ch);
246249
return NULL;
247250
}
248251
return comp;
@@ -358,6 +361,9 @@ ACMD(do_design)
358361

359362
if (!prog) {
360363
send_to_char(ch, "The program design isn't on %s.\r\n", decapitalize_a_an(GET_OBJ_NAME(comp)));
364+
// A computer isn't used to design a complex form, but we use a different command for that
365+
if (PRF_FLAGGED(ch, PRF_SEE_TIPS) && IS_OTAKU(ch))
366+
send_to_char("[OOC: To learn a complex form, try ^WFORMS LEARN <FORM>^n.]\r\n", ch);
361367
return;
362368
}
363369
if (GET_DESIGN_COMPLETED(prog) || GET_DESIGN_PROGRAMMING_TICKS_LEFT(prog)) {

0 commit comments

Comments
 (0)