Ok, I still think that you're jumping the gun with the actual coding here. Because right now you're just adding methods that are copies of earlier methods for the various mission types. This is actually where sub-classing would come into play.
Basically, you shouldn't repeat any code - you figure out how to get the same job done with just one set of any piece of code. Resorting to copy-pasting to manufacture a large module with methods that are basically the same is just... not good programming. In fact - copy-pasting is not programming.
So I'd suggest you focus on the design on the missions and put it all into writing. Only then can we start building the achitecture from the ground up. And make desicions like: We should have a new class for every type of mission? Or not.
Right now you're producing code you might not even need in the end. Its starting to become a bit messy at the very least.
Also, since you will have a multi-lingual mod, you shouldn't add long strings of text into method invocations. Define string variables and use those instead.
As far as adding names and stuff into text, this needs to be done with the CyTranslator class or it won't work with the XML and translations and stuff in the game. (Otherwise you're on the right track as far as Python as such goes. But it won't work satisfactorily with CivIV.) Example:
Code:
Translator = CyTranslator()
...
goldenAgeMessage = "The Senate notes that you have succeeded in your mission and rewards you with [B]%s1[/B] turns of Golden Age!"
...
self.Message = goldenAgeMessage
...
turns = str(self.Reward)
message = Translator.getText(self.Message, [B](turns,)[/B])
showPopup(self.Header, message)
The "%s1" bit indicates the first string value to be included into the string by the CyTranslator.getText() method. (The second one would be defined as "%s2".) The built-in str() method convert the integer value self.Reward into a valid string type.
Later you can define all the strings in the XML and simply use a XML tag like "XML_TEXT_SENATE_MISSION_GOLDEN_AGE" for the Python strings variables.
One thing you should know about logical operators and boolean expressions is that every expression separated by the command
and is evaluated before the interpreter moves on to the next one. Take this expression:
The sum of this expression is False. But there are three sub-expressions inside the big one (the whole line) separated by and:s - each one is expressed by a boolean value in this example. The first expression (the value True) is evaluated as True, and thus the interpreter will move on the the next expression (the value False). This second expression evaluates to False however, so the entire expression (with the 3 sub-expressions) is immediately evaluated to be False - as the second expression didn't equate to True.
The interesting thing is that that the third expression - the second False value - never even got evaluated! This is actually related to your question, as your conditional statement is also evaluated one expression at a time:
Code:
if isPlotOwner(self.tCoords, self.ePlayer) == False and isPlotCity(self.tCoords) == True:
The entire if statement is one boolean expression - its either True of False. But it contains two sub-expressions:
Code:
isPlotOwner(self.tCoords, self.ePlayer) == False
and
Code:
isPlotCity(self.tCoords) == True
...respectively.
If the return value of isPlotOwner() is True, then its not the same as False. This means that the expression evaluates to False, as True != False. And only if this function returns False and the isPlotCity() function returns True (otherwise False != True) will the entire if statement evaluate to True. So unless both these expressions are True, the condition fails (== False).
So, in other words - if the first check doesn't pass - meaning that the self.ePlayer is indeed the plot owner - then the second check - whether or not there is a city on that plot - is never even evaluated.
And this in turn answers your actual question: The else statement doesn't take into account whether or not the isPlotCity() method is even checked - or what it would return on the if statement if it were to be called. It is only concerned with whether or not the original if statement evaluates to True - or not.
I realize this can be hard to fathom, but if you break things into smaller expressions and imagine the interpreter (the program reading the code) reading it in segments you should be able to figure it out.