Browse Source

Add GolemHoldingCell

pull/2409/head
Anders Jenbo 5 years ago
parent
commit
78124fb389
  1. 4
      Source/missiles.cpp
  2. 2
      Source/missiles.h
  3. 20
      Source/monster.cpp
  4. 2
      Source/msg.cpp

4
Source/missiles.cpp

@ -2654,7 +2654,7 @@ void AddGolem(int mi, Point src, Point dst, int /*midir*/, int8_t /*mienemy*/, i
Missiles[mi]._miVar2 = src.y;
Missiles[mi]._miVar4 = dst.x;
Missiles[mi]._miVar5 = dst.y;
if (Monsters[id].position.tile != Point { 1, 0 } && id == MyPlayerId)
if (Monsters[id].position.tile != GolemHoldingCell && id == MyPlayerId)
M_StartKill(id, id);
UseMana(id, SPL_GOLEM);
}
@ -3157,7 +3157,7 @@ void MI_Dummy(int i)
void MI_Golem(int mi)
{
int src = Missiles[mi]._misource;
if (Monsters[src].position.tile == Point { 1, 0 }) {
if (Monsters[src].position.tile == GolemHoldingCell) {
for (int i = 0; i < 6; i++) {
int k = CrawlNum[i];
int ck = k + 2;

2
Source/missiles.h

@ -18,6 +18,8 @@ namespace devilution {
#define MAXMISSILES 125
constexpr Point GolemHoldingCell = Point { 1, 0 };
struct ChainStruct {
int idx;
int _mitype;

20
Source/monster.cpp

@ -867,7 +867,7 @@ void UpdateEnemy(MonsterStruct &monster)
continue;
if ((otherMonster._mhitpoints >> 6) <= 0)
continue;
if (otherMonster.position.tile == Point { 1, 0 })
if (otherMonster.position.tile == GolemHoldingCell)
continue;
if (M_Talker(otherMonster) && otherMonster.mtalkmsg != TEXT_NONE)
continue;
@ -3954,10 +3954,10 @@ void InitMonsters()
CheckDungeonClear();
#endif
if (!setlevel) {
AddMonster({ 1, 0 }, DIR_S, 0, false);
AddMonster({ 1, 0 }, DIR_S, 0, false);
AddMonster({ 1, 0 }, DIR_S, 0, false);
AddMonster({ 1, 0 }, DIR_S, 0, false);
AddMonster(GolemHoldingCell, DIR_S, 0, false);
AddMonster(GolemHoldingCell, DIR_S, 0, false);
AddMonster(GolemHoldingCell, DIR_S, 0, false);
AddMonster(GolemHoldingCell, DIR_S, 0, false);
}
if (!gbIsSpawn && !setlevel && currlevel == 16)
@ -4020,10 +4020,10 @@ void InitMonsters()
void SetMapMonsters(const uint16_t *dunData, Point startPosition)
{
AddMonsterType(MT_GOLEM, PLACE_SPECIAL);
AddMonster({ 1, 0 }, DIR_S, 0, false);
AddMonster({ 1, 0 }, DIR_S, 0, false);
AddMonster({ 1, 0 }, DIR_S, 0, false);
AddMonster({ 1, 0 }, DIR_S, 0, false);
AddMonster(GolemHoldingCell, DIR_S, 0, false);
AddMonster(GolemHoldingCell, DIR_S, 0, false);
AddMonster(GolemHoldingCell, DIR_S, 0, false);
AddMonster(GolemHoldingCell, DIR_S, 0, false);
if (setlevel && setlvlnum == SL_VILEBETRAYER) {
AddMonsterType(UniqMonst[UMT_LAZARUS].mtype, PLACE_UNIQUE);
AddMonsterType(UniqMonst[UMT_RED_VEX].mtype, PLACE_UNIQUE);
@ -4411,7 +4411,7 @@ void DeleteMonsterList()
if (!golem._mDelFlag)
continue;
golem.position.tile = { 1, 0 };
golem.position.tile = GolemHoldingCell;
golem.position.future = { 0, 0 };
golem.position.old = { 0, 0 };
golem._mDelFlag = false;

2
Source/msg.cpp

@ -2034,7 +2034,7 @@ void DeltaLoadLevel()
M_UpdateLeader(i);
} else {
decode_enemy(monster, sgLevels[currlevel].monster[i]._menemy);
if (monster.position.tile != Point { 0, 0 } && monster.position.tile != Point { 1, 0 })
if (monster.position.tile != Point { 0, 0 } && monster.position.tile != GolemHoldingCell)
dMonster[monster.position.tile.x][monster.position.tile.y] = i + 1;
if (i < MAX_PLRS) {
GolumAi(i);

Loading…
Cancel
Save