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:
parent
4af543bcd0
commit
2ad84db2ff
3
TODO
Normal file
3
TODO
Normal 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
|
95
src/fight.c
95
src/fight.c
@ -363,16 +363,40 @@ void death_cry(struct char_data *ch)
|
||||
|
||||
void raw_kill(struct char_data *ch)
|
||||
{
|
||||
if (FIGHTING(ch))
|
||||
stop_fighting(ch);
|
||||
if (FIGHTING(ch))
|
||||
stop_fighting(ch);
|
||||
|
||||
while (ch->affected)
|
||||
affect_remove(ch, ch->affected);
|
||||
while (ch->affected)
|
||||
affect_remove(ch, ch->affected);
|
||||
|
||||
death_cry(ch);
|
||||
death_cry(ch);
|
||||
|
||||
make_corpse(ch);
|
||||
extract_char(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);
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -819,36 +843,45 @@ int damage(struct char_data *ch, struct char_data *victim, int dam, int attackty
|
||||
if (GET_POS(victim) <= POS_STUNNED && FIGHTING(victim) != NULL)
|
||||
stop_fighting(victim);
|
||||
|
||||
/* Uh oh. Victim died. */
|
||||
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);
|
||||
}
|
||||
/* Uh oh. Victim died. */
|
||||
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)) {
|
||||
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);
|
||||
}
|
||||
die(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);
|
||||
}
|
||||
die(victim);
|
||||
|
||||
/* If AUTOLOOT is enabled, loot everything from corpse */
|
||||
if (IS_NPC(victim) && !IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTOLOOT))
|
||||
do_get(ch, "all corpse", 0, 0);
|
||||
/* If AUTOLOOT is enabled, loot everything from corpse */
|
||||
if (IS_NPC(victim) && !IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTOLOOT))
|
||||
do_get(ch, "all corpse", 0, 0);
|
||||
|
||||
/* IF AUTODRAIN is enabled, drain corpse */
|
||||
if (IS_NPC(victim) && !IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTODRAIN))
|
||||
do_drain(ch, "corpse", 0, 0);
|
||||
/* IF AUTODRAIN is enabled, drain corpse */
|
||||
if (IS_NPC(victim) && !IS_NPC(ch) && PRF_FLAGGED(ch, PRF_AUTODRAIN))
|
||||
do_drain(ch, "corpse", 0, 0);
|
||||
|
||||
return (-1);
|
||||
}
|
||||
return (dam);
|
||||
return (-1);
|
||||
}
|
||||
|
||||
return (dam);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Calculate the THAC0 of the attacker.
|
||||
*
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user