Added support for the Passage

Added support for the Passage (currently with only one room).
Characters will automatically get here when dead, and they will
need to find a way to reborn to the Planes (currently there is
no such way, but to logout and login again) (see newly created
TODO file).

Signed-off-by: Gergely Polonkai (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
Gergely Polonkai (W00d5t0ck) 2012-03-06 17:55:06 +01:00
parent 4af543bcd0
commit 2ad84db2ff
3 changed files with 72 additions and 31 deletions

3
TODO Normal file
View File

@ -0,0 +1,3 @@
* Make the Passage work as intended:
o characters should get back here upon logoff/logon
o there must be a way to get out from there

View File

@ -371,9 +371,33 @@ void raw_kill(struct char_data *ch)
death_cry(ch);
if (IS_NPC(ch))
{
make_corpse(ch);
extract_char(ch);
}
else
{
send_to_char(ch, "You feel yourself being pulled into a bright light...\r\n");
char_from_room(ch);
char_to_room(ch, real_room(rand_number(PASSAGE_MIN, PASSAGE_MAX)));
GET_HIT(ch) = GET_MAX_HIT(ch);
GET_MANA(ch) = GET_MAX_MANA(ch);
GET_MOVE(ch) = GET_MAX_MOVE(ch);
update_pos(ch);
look_at_room(ch, 0);
if (!PLR_FLAGGED(ch, PLR_DEAD))
{
/* TODO: Do something here, like temporarily remove the player's gold...
GET_TEMP_GOLD(ch) = GET_GOLD(ch);
GET_GOLD(ch) = 0;
*/
/* TODO: Set the DEAD flag on the player. Later it has to be removed somehow!
SET_BIT(PLR_FLAGS(ch), PLR_DEAD);
*/
}
}
}
@ -820,15 +844,24 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty
stop_fighting(victim);
/* Uh oh. Victim died. */
if (GET_POS(victim) == POS_DEAD) {
if (ch != victim && (IS_NPC(victim) || victim->desc)) {
if (GET_POS(victim) == POS_DEAD)
{
if (
(ch != victim)
&& (
IS_NPC(victim)
|| victim->desc
)
)
{
if (AFF_FLAGGED(ch, AFF_GROUP))
group_gain(ch, victim);
else
solo_gain(ch, victim);
}
if (!IS_NPC(victim)) {
if (!IS_NPC(victim))
{
mudlog(BRF, LVL_IMMORT, TRUE, "%s killed by %s at %s", GET_NAME(victim), GET_NAME(ch), world[IN_ROOM(victim)].name);
if (MOB_FLAGGED(ch, MOB_MEMORY))
forget(ch, victim);
@ -845,10 +878,10 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty
return (-1);
}
return (dam);
}
/*
* Calculate the THAC0 of the attacker.
*

View File

@ -174,6 +174,7 @@
#define PLR_INVSTART (1 << 14) /* Player should enter game wizinvis */
#define PLR_CRYO (1 << 15) /* Player is cryo-saved (purge prog) */
#define PLR_NOTDEADYET (1 << 16) /* (R) Player being extracted. */
#define PLR_DEAD (1 << 17) /* Player is dead */
/* Mobile flags: used by char_data.char_specials.act */
@ -468,6 +469,10 @@
#define LVL_GOD 32
#define LVL_IMMORT 31
/* Room numbers for the Passage ******************************************/
#define PASSAGE_MIN 101
#define PASSAGE_MAX 101
/* Level of the 'freeze' command */
#define LVL_FREEZE LVL_GRGOD