OrionVeteran
Deity
Bmarnz,
You will have to use the appropriate/correct language, but here is my programming strategy for determining if a player has achieved a religious victory:
Set MyRVCheck as Boolean
Set ReligiousVictory as Boolean
MyRVCheck = True
ReligiousVictory = False
If Tech Divine Right has been discovered then
....If player state religion = 75% religious influence then
........Loop through all player owned cities
............If state religion exists in city then
................If non-state religion exists in city then
....................MyRVCheck = False
....................Exit Function
................End If
............Else
................MyRVCheck = False
................Exit Function
............End If
........End loop
....Else
........MyRVCheck = False
........Exit Function
....End If
Else
....MyRVCheck = False
....Exit Function
End if
If MyRVCheck = True Then
....ReligiousVictory = True
....Player has won a Religious Victory
End IF
All it takes is one false condition to show that a religious victory has not been achieved.
This code covers 4 out of 5 of the proposed pre-requisites for achieving the victory condition. I hope this strategy triggers some ideas and is helpful.
Very Respectfully,
Orion Veteran
You will have to use the appropriate/correct language, but here is my programming strategy for determining if a player has achieved a religious victory:
Set MyRVCheck as Boolean
Set ReligiousVictory as Boolean
MyRVCheck = True
ReligiousVictory = False
If Tech Divine Right has been discovered then
....If player state religion = 75% religious influence then
........Loop through all player owned cities
............If state religion exists in city then
................If non-state religion exists in city then
....................MyRVCheck = False
....................Exit Function
................End If
............Else
................MyRVCheck = False
................Exit Function
............End If
........End loop
....Else
........MyRVCheck = False
........Exit Function
....End If
Else
....MyRVCheck = False
....Exit Function
End if
If MyRVCheck = True Then
....ReligiousVictory = True
....Player has won a Religious Victory
End IF
All it takes is one false condition to show that a religious victory has not been achieved.


Very Respectfully,
Orion Veteran
