![]() |
#1 |
Apprentice
Join Date: Feb 2021
Posts: 50
![]() |
Beastmaster Quests - Can I hack up the corpse?
Do the beastmaster want the entire 500lbs corpse or is he happy if I (h)ack up the corpse and take him some meat?
|
![]() |
![]() |
![]() |
#2 |
Apprentice
Join Date: Dec 2008
Location: West Virginia
Posts: 51
![]() |
A piece of meat is fine. Be careful hacking up corpses, though. Some of them may have bad effects.
|
![]() |
![]() |
![]() |
#3 |
Scout
Join Date: Sep 2020
Location: Suburbia :(
Posts: 26
![]() |
It's usually recommended to eat from the corpse before hacking (since that will provide the necessary resists right off the bat). Though the damage is based on the weight of the corpse, and the cap is very high if there's a cap at all; even with double resist, a Great Hell Wyrm might do a lot of damage.
... I should check this in debug mode. Edit: yeah okay, double resist is enough, you'll take < 50 HP damage from a Great Hell Wyrm corpse. Single resist OTOH is definitely not enough, my test character took over 600. Interestingly, eating from the corpse works even for a Great Wyrm of Power corpse, which will otherwise kill you instantly with a blast of (unresistable) raw mana. Funny, I don't remember seeing anything like that in the code... Last edited by fiery_mews; March 23, 2021 at 21:16. |
![]() |
![]() |
![]() |
#4 |
Apprentice
Join Date: Feb 2021
Posts: 50
![]() |
Thanks for the responses!
I did not even know that eating the meat will do something! I just wanted to get the corpse preservation and monster lore skills! |
![]() |
![]() |
![]() |
#5 |
Apprentice
Join Date: Dec 2008
Location: West Virginia
Posts: 51
![]() |
Eating a piece of meat, hacking a corpse, and eating a corpse can all have different effects. Usually eating meat doesn't have the bad effects and can be quite useful.
|
![]() |
![]() |
![]() |
#6 |
Scout
Join Date: Sep 2020
Location: Suburbia :(
Posts: 26
![]() |
Eating a monster's meat has no effects, good or bad. Eating corpses can have good effects, bad effects, or both. In general IIRC it is unwise to eat the remains of anything with necromantic powers, but I'd have to check the code for other stuff.
|
![]() |
![]() |
![]() |
#7 |
Scout
Join Date: Sep 2020
Location: Suburbia :(
Posts: 26
![]() |
So... extensive spoilers follow...
I think the main function we want is this Code:
/* * Determine the effects of eating a corpse. A corpse can be * eaten whole or cut into pieces for later. */ static void corpse_effect(object_type *o_ptr, bool cutting) Code:
/* Immediate effects - poison, acid, fire, etc. */ if (!cutting) { for (i = 0; i < 4; i++) { /* skip empty blow slot */ if (!r_ptr->blow[i].method) continue; method = r_ptr->blow[i].method; effect = r_ptr->blow[i].effect; d_dice = r_ptr->blow[i].d_dice; d_side = r_ptr->blow[i].d_side; dam = damroll(d_dice, d_side) * o_ptr->pval / o_ptr->weight / 2; idam = damroll(d_dice, d_side) * ((o_ptr->weight / o_ptr->pval > 2) ? o_ptr->weight / o_ptr->pval : 2); mdam = maxroll(d_dice, d_side) * 2; The TL;DR though is that monsters with elemental melee attacks will damage you with those elements when eaten; ones that cause confusion or hallucination on hit, will cause those statuses when eaten; ones that paralyze or reduce stats, likewise, etc. Code:
/* Don't eat Morgoth's corpse :) */ case RBE_LOSE_ALL: { do_dec_stat(A_STR, STAT_DEC_NORMAL); do_dec_stat(A_INT, STAT_DEC_NORMAL); do_dec_stat(A_WIS, STAT_DEC_NORMAL); do_dec_stat(A_DEX, STAT_DEC_NORMAL); do_dec_stat(A_CON, STAT_DEC_NORMAL); do_dec_stat(A_CHR, STAT_DEC_NORMAL); o_ptr->pval = 1; break; } case RBE_SANITY: { msg_print("You feel your sanity slipping away!"); take_sanity_hit(dam, "eating an insane monster"); break; } Code:
/* * The organ that supplies breath attacks is not * immediately emptied upon death, although some types * of breath have no effect. * AMHD's make rather risky meals, and deadly snacks. */ /* Acid */ if ((r_ptr->spells & SF_BR_ACID) && brpow > 0) { brdam = ((brpow / 3) > 1600 ? 1600 : (brpow / 3)); msg_print("You are hit by a gush of acid!"); /* Total Immunity */ if (!(p_ptr->immune_acid || (brdam <= 0))) { /* Take damage */ acid_dam(brdam, "a gush of acid"); harmful = true; } o_ptr->pval = 1; } else if (r_ptr->spells & SF_BR_ACID) { set_oppose_acid(p_ptr->oppose_acid + rand_int(10) + 10); } Nether and confusion breathers OTOH don't offer resistance if eaten directly, they just hit you with damage and status effects. Chaos breathers likewise. Code:
/* Disenchantment */ if ((r_ptr->spells & SF_BR_DISE) && brpow > 0) { brdam = ((brpow / 6) > 500 ? 500 : (brpow / 6)); msg_print("You are blasted by raw mana!"); if (p_ptr->resist_disen) { brdam *= 6; brdam /= (randint(6) + 6); } else { apply_disenchant(0); } /* Take damage */ take_hit(brdam, "raw mana"); o_ptr->pval = 1; } Code:
/* * Hack -- Jellies, kobolds, spiders, icky things, molds, and mushrooms * are immune to poison because their body already contains * poisonous chemicals. */ if (strchr("ijkmS,", r_ptr->d_char) && (r_ptr->flags & RF_IM_POIS)) { if (!(p_ptr->resist_pois || p_ptr->oppose_pois)) { set_poisoned(p_ptr->poisoned + rand_int(15) + 10); } harmful = true; } Code:
/* * Bad effects override good effects * and hacked-up corpses lose intrinsics. */ if (!harmful && !cutting && (o_ptr->sval != SV_CORPSE_MEAT)) { if (r_ptr->flags & RF_IM_ACID) { set_oppose_acid(p_ptr->oppose_acid + rand_int(10) + 10); } if (r_ptr->flags & RF_IM_ELEC) { set_oppose_elec(p_ptr->oppose_elec + rand_int(10) + 10); } if (r_ptr->flags & RF_IM_FIRE) { set_oppose_fire(p_ptr->oppose_fire + rand_int(10) + 10); } if (r_ptr->flags & RF_IM_COLD) { set_oppose_cold(p_ptr->oppose_cold + rand_int(10) + 10); } if (r_ptr->flags & RF_IM_POIS) { set_oppose_pois(p_ptr->oppose_pois + rand_int(10) + 10); } if (r_ptr->flags & RF_RES_NETH) { set_protevil(p_ptr->protevil + rand_int(25) + 3 * r_ptr->level); } if (r_ptr->flags & RF_RES_PLAS) { set_oppose_fire(p_ptr->oppose_fire + rand_int(20) + 20); } if (r_ptr->flags & RF_SHAPECHANGER) { /* DGDGDG set_mimic(20 , rand_int(MIMIC_VALAR)); */ } if (r_ptr->flags & RF_DEMON) { /* DGDGDG set_mimic(30 , MIMIC_DEMON); */ } if (r_ptr->flags & RF_UNDEAD) { /* DGDGDG set_mimic(30 , MIMIC_VAMPIRE); */ } if (r_ptr->flags & RF_NO_FEAR) { set_afraid(0); } if (r_ptr->flags & RF_NO_STUN) { set_stun(0); } if (r_ptr->flags & RF_NO_CONF) { set_confused(0); } if (r_ptr->spells & SF_S_THUNDERLORD) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_THUNDERLORD, false); } if (r_ptr->spells & SF_S_DEMON) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_DEMON, false); } if (r_ptr->spells & SF_S_KIN) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_KIN, false); } if (r_ptr->spells & SF_S_HI_DEMON) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_HI_DEMON, false); } if (r_ptr->spells & SF_S_MONSTER) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, 0, false); } if (r_ptr->spells & SF_S_MONSTERS) { int k; for (k = 0; k < 8; k++) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, 0, false); } } if (r_ptr->spells & SF_S_UNDEAD) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_UNDEAD, false); } if (r_ptr->spells & SF_S_DRAGON) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_DRAGON, false); } if (r_ptr->spells & SF_S_ANT) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_ANT, false); } if (r_ptr->spells & SF_S_SPIDER) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_SPIDER, false); } if (r_ptr->spells & SF_S_HOUND) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_HOUND, false); } if (r_ptr->spells & SF_S_HYDRA) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_HYDRA, false); } if (r_ptr->spells & SF_S_ANGEL) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_ANGEL, false); } if (r_ptr->spells & SF_S_HI_DRAGON) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_HI_DRAGON, false); } if (r_ptr->spells & SF_S_HI_UNDEAD) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_HI_UNDEAD, false); } if (r_ptr->spells & SF_S_WRAITH) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_WRAITH, false); } if (r_ptr->spells & SF_S_UNIQUE) { summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_UNIQUE, false); } } |
![]() |
![]() |
![]() |
#8 |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,726
Donated: $40
![]() |
This kind of thing:
Code:
brdam *= 6; brdam /= (randint(6) + 6); Code:
brdam = (brdam * 6) / (randint(6) + 6); It is also magnificent to nest a block of 31 non-exclusive if statements in still another conditional. |
![]() |
![]() |
![]() |
#9 |
Apprentice
Join Date: Dec 2008
Location: West Virginia
Posts: 51
![]() |
I thought the summoning effect was still there for meat. I could be wrong.
|
![]() |
![]() |
![]() |
#10 |
Scout
Join Date: Sep 2020
Location: Suburbia :(
Posts: 26
![]() |
@Pete Mack
The original T2 codebase is even more horrifying; I'm still in awe of AnonymousHero, TBH. (My own contributions to the C++ port were pretty minimal.) @Yottle Nope, hacked meat still doesn't work. Note Code:
if (!harmful && !cutting && (o_ptr->sval != SV_CORPSE_MEAT)) |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tome 2.3.5 - no side quests | KesTheHammer | ToME | 4 | February 5, 2021 13:06 |
Best code examples for terrain generation, AI and quests? | droof | Development | 20 | February 16, 2018 05:00 |
Chengband # of random quests prompt | ekolis | Variants | 9 | June 18, 2012 00:17 |
real time roguelike/hack'n'slash | bebo | Idle chatter | 0 | February 8, 2009 15:57 |
[Z] Completing quests | Parcae | Variants | 2 | October 14, 2007 19:41 |