Files
source/Strategic/strategic town reputation.h
Marco Antonio J. Costaandmajcosta 86ad401186 add newline at end of file where it's lacking
.editorconfig already enforces it but it's getting changed piecemeal in
every commit. just get it done with.

the script:
```

find . -type f -not -path "./.git/*" -not -path "./.vs/*" | while read -r file; do
	isFile=$(file -0 "$file" | cut -d $'\0' -f2)
	case "$isFile" in
		(*text*)
			echo "$file is text"
			if [[ $(tail -c 1 "$file" | wc -l) -ne 1 ]]; then
				echo "" >> "$file"
			fi
			;;
		(*)
			echo "file isn't text"
			;;
	esac
done
```
2024-12-14 19:05:48 -03:00

37 lines
1.4 KiB
C

#ifndef _STRATEGIC_TOWN_REPUTATION_H
#define _STRATEGIC_TOWN_REPUTATION_H
#include "types.h"
#include "Soldier Control.h"
// header to contain functions to handle strategic town reputation
// initialize profiles for the town reputation system
void InitializeProfilesForTownReputation( void );
// post events to handle spread of town loyalty
void PostEventsForSpreadOfTownOpinion( void );
// get the towns opinion of this merc...indexed by profile type
UINT8 GetTownOpinionOfMerc( UINT8 ubProfileId, UINT8 ubTownId );
UINT8 GetTownOpinionOfMercForSoldier( SOLDIERTYPE *pSoldier, UINT8 ubTownId );
// update merc reputation for this town by this amount
void UpdateTownOpinionOfThisMerc( UINT8 ubProfileId, UINT8 ubTownId, INT8 bAmount );
void UpdateTownOpinionOfThisMercForSoldier( SOLDIERTYPE *pSoldier, UINT8 ubTownId, INT8 bAmount );
// global handling of spread
void HandleSpreadOfAllTownsOpinion( void );
// handles the spread of town opinion for one merc
void HandleSpreadOfTownOpinionForMerc( UINT8 ubProfileId );
// handles the opinion spread between these two towns about this merc at the distance between them
void HandleOpinionOfTownsAboutSoldier( INT8 bTownA, INT8 bTownB, INT32 iDistanceBetweenThem, UINT8 ubProfile );
/*
// handle only for mercs on players team
void HandleSpreadOfTownsOpinionForCurrentMercs( void );
void HandleSpreadOfTownOpinionForMercForSoldier( SOLDIERTYPE *pSoldier );
*/
#endif