Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Vanilla (http://angband.oook.cz/forum/forumdisplay.php?f=3)
-   -   Preparing for 4.2 release (http://angband.oook.cz/forum/showthread.php?t=9455)

Nick June 24, 2019 22:24

Quote:

Originally Posted by Sphara (Post 138844)
Little bug on Beorn. In monster description, his human form is supposed to move at normal speed and bear form is supposed to move quickly (+10). Still, Beorn has normal speed in both forms.

Yeah, that's actually intended (it's meant to be only the race that changes), but silly in the case of speed. I'll change that.

wobbly June 25, 2019 07:58

Shouldn't it be everything but hps? I'd expect AC to change for instance. I'm also a little curious about what happens if something shapechanges into a breeder.

Ingwe Ingweron June 25, 2019 11:25

I think it's wrong that shape-changed monsters get the high-end powers of the new shape. You might look like Huan, or even get the hitpoints, but really, you get all the supreme powers too? And what about shape-changing into things with spell powers? Did the shape-changer get an instant education that took years for the actual one to learn?

Nick June 25, 2019 12:55

Quote:

Originally Posted by Ingwe Ingweron (Post 138852)
I think it's wrong that shape-changed monsters get the high-end powers of the new shape. You might look like Huan, or even get the hitpoints, but really, you get all the supreme powers too? And what about shape-changing into things with spell powers? Did the shape-changer get an instant education that took years for the actual one to learn?

The big shapechangers are Maiar, so yeah, I reckon they can do anything they set their minds to.

Quote:

Originally Posted by wobbly (Post 138849)
Shouldn't it be everything but hps? I'd expect AC to change for instance. I'm also a little curious about what happens if something shapechanges into a breeder.

As far as what the actual mechanics go, when a monster changes currently they just change their race. So they keep their current hitpoints, status effects, and inventory, but for many things it is the race that is looked at - spellcasting and other abilities, hearing, smell, AC are all examples. For detail, look at what is in struct monster_race and what is in struct monster in monster.h. Speed is a special case because, while average speed is defined in the race, speed for an individual monster is allocated at birth, and may be a couple of points above or below average. Consequently speed needs to be changed when the player changes.

PowerWyrm June 26, 2019 13:05

Just something I spotted while porting some stuff to PWMAngband...

File: player-util.c

Code:

void player_over_exert(struct player *p, int flag, int chance, int amount)
{
...
player_stat_dec(player, STAT_CON, perm);
...
player_inc_timed(player, TMD_PARALYZED, randint1(amount),
...
}

One day you should get rid of that "player" global variable... And the "cave" one while you're at it...

Nick June 26, 2019 13:12

OK, new builds up on the nightlies page and angband.live which will probably break savefiles (although probably not if the character's food counter is below 1/2). Changes are a couple of bugfixes plus a biggish rework of food; in detail:
  • Shapechanging monsters adopt the speed of their new shape
  • Character state of nourishment is now referred to in most places as a percentage
  • There is a permanent hunger meter displaying the percentage, along with the usual hunger descriptions
  • Full now starts at 80% nourished, and the player loses 1 speed with every 2% above that
  • No more gorged status or vomiting
  • Regeneration now goes faster the more nourished the player is, including when they are full
  • Druids' Herbal Healing has been replaced by Rapid Regeneration, which gives phased healing over several turns (as before) at the cost of 10% nourishment per turn, and Herbal Curing, which cures the same status conditions as before plus Black Breath
  • Rangers get Herbal Curing but not Rapid Regeneration
  • Necromancers in the early stage of vampire form where they still get HP and nourishment from their bite attack are immune from slowing due to fullness
  • Satisfy Hunger (both scrolls and spells) now sets the player to 50% nourished; Elvish Waybread sets to 75% (or gives no nourishment if the player is already above 75%)

These are quite big changes, which aim to integrate the food system more thoroughly into the game. I think they work well, but let me know how they play.

Nick June 26, 2019 13:15

Quote:

Originally Posted by PowerWyrm (Post 138862)
Just something I spotted while porting some stuff to PWMAngband...

File: player-util.c

Code:

void player_over_exert(struct player *p, int flag, int chance, int amount)
{
...
player_stat_dec(player, STAT_CON, perm);
...
player_inc_timed(player, TMD_PARALYZED, randint1(amount),
...
}

One day you should get rid of that "player" global variable... And the "cave" one while you're at it...

Thanks. You're right, of course, but not tonight :)

PowerWyrm June 26, 2019 14:31

Looking at the change that adds random attack to bloodlust-affected characters... it involves modifying the process_command() function. Ouch... When I look at this function in PWMAngband... it's a client function. This means modifying the code like in V doesn't prevent anyone from hacking the client and removing/tweaking it. Not something that I would want...

Now looking where I could implement that on the server instead... it seems the best location would be the "has_energy" function which rejects commands if the player doesn't have enough energy to act. Including the code there and returning "false" when a random attack occurs should work fine.

PowerWyrm June 26, 2019 15:19

File player-attack.c, about shield bashes:

Code:

bool attempt_shield_bash(struct player *p, struct monster *mon, bool *fear, int *blows)
{
...

        /* Players bash more often when they see a real need: */
...
if (weapon->dd * weapon->ds * (*blows) < shield->dd * shield->ds * 3)
{
                /* ... or armed with a puny weapon */
bash_chance *= 2;
}
}

Problem: blows is always 0 (see py_attack), so the x2 buff always applies for all weapons...

mrfy June 26, 2019 16:44

Quote:

Originally Posted by Nick (Post 138863)
OK, new builds up on the nightlies page and angband.live which will probably break savefiles (although probably not if the character's food counter is below 1/2). Changes are a couple of bugfixes plus a biggish rework of food; in detail:
  • Satisfy Hunger (both scrolls and spells) now sets the player to 50% nourished; Elvish Waybread sets to 75% (or gives no nourishment if the player is already above 75%)

FYI, my savefile didn't break and when I started my food was at 99%. Rested and down to 76%, when for a whim I cast Satisfy Hunger (I'm trying out the revamped Ranger class). Food drops to 49%. Shouldn't the Satisfy Hunger verse just do nothing and leave you at 76%?

Later I ate two slime molds (yum!) which take me to 83% and slow, so I cast Satisfy Hunger and back to normal 49%. I can also verify that the Satisfy Hunger scroll acts the same way.


All times are GMT +1. The time now is 01:54.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.