New feature: bloodcat/zombie/bandit raids on player-controlled sectors

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23711&goto=353154&#msg_353154

Requires GameDir >= r2420

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8554 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2018-04-15 14:42:01 +00:00
parent 1ea69989ed
commit 80674249cc
52 changed files with 1628 additions and 479 deletions
+9 -13
View File
@@ -4051,22 +4051,18 @@ return 0;
// used when monsters attack a town sector without going through tactical and they win
static int l_AdjustLoyaltyForCivsEatenByMonsters(lua_State *L)
{
UINT8 n = lua_gettop(L);
int i;
INT16 sSectorX;
INT16 sSectorY;
UINT8 ubHowMany;
for (i= 1; i<=n; i++ )
UINT8 n = lua_gettop(L);
if ( n >= 3 )
{
if (i == 1 ) sSectorX = lua_tointeger(L,i);
if (i == 2 ) sSectorY = lua_tointeger(L,i);
if (i == 3 ) ubHowMany = lua_tointeger(L,i);
INT16 sSectorX = lua_tointeger( L, 1 );
INT16 sSectorY = lua_tointeger( L, 2 );
UINT8 ubHowMany = lua_tointeger( L, 3 );
AdjustLoyaltyForCivsEatenByMonsters( sSectorX, sSectorY, ubHowMany, ( guCreatureAttackType == CREATURE_ATTACK_TYPE_BANDIT ) );
}
AdjustLoyaltyForCivsEatenByMonsters( sSectorX, sSectorY, ubHowMany);
return 0;
return 0;
}
static int l_IsTownUnderCompleteControlByPlayer(lua_State *L)