MCPcopy Create free account
hub / github.com/diasurgical/devilution / SetPlrVit

Function SetPlrVit

Source/player.cpp:4115–4133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4113}
4114
4115void SetPlrVit(int p, int v)
4116{
4117 int hp;
4118
4119 if ((DWORD)p >= MAX_PLRS) {
4120 app_fatal("SetPlrVit: illegal player %d", p);
4121 }
4122
4123 plr[p]._pBaseVit = v;
4124
4125 hp = v << 6;
4126 if (plr[p]._pClass == PC_WARRIOR) {
4127 hp <<= 1;
4128 }
4129
4130 plr[p]._pHPBase = hp;
4131 plr[p]._pMaxHPBase = hp;
4132 CalcPlrInv(p, TRUE);
4133}
4134
4135void InitDungMsgs(int pnum)
4136{

Callers 1

On_SETVITFunction · 0.85

Calls 2

app_fatalFunction · 0.85
CalcPlrInvFunction · 0.85

Tested by

no test coverage detected