Revision: 348
Author: TongShen.Martin
Date: Tue Sep 29 23:51:43 2009
Log: 0.303: 修正:修正集团军系统等的Bug
修正丢失的外交文字
界面:将英雄姓名放置在部分屏幕
修正随机英雄屏幕显示问题
显示丹阳兵进攻水军的胜率
地图:调整了地图部分势力非史实初始兵力的参数
规则调整:添加了几个游戏选项
0.303: fix: fix various small bugs
fix a few bugs in Army system
fix missing diplomacy text
map: revised dynamic initial unit rule for major civs
interface: place hero names on some screen
fix random hero screen display problem
display combat odds when Danyang Armies attack naval units
rule tweak: added a few game options
http://code.google.com/p/sanguoforciv4/source/detail?r=348
Added:
/trunk/The History of Three Kingdoms/Assets/Python/CvQuestManager.py
/trunk/The History of Three
Kingdoms/Assets/Python/CvTutorialEventManager.py
/trunk/The History of Three
Kingdoms/Assets/Python/Screens/CvTutorialAdvisorScreen.py
/trunk/The History of Three Kingdoms/Assets/Python/Tutorial.py
/trunk/The History of Three Kingdoms/Documents/HoTK_Readme_EN.html
/trunk/The History of Three Kingdoms/Documents/三国春秋简介.html
Deleted:
/trunk/The History of Three Kingdoms/Documents/ReadMe for HoTK Release
2.4.html
Modified:
/trunk/The History of Three
Kingdoms/Assets/Python/Contrib/CvOverlayScreenUtils.py
/trunk/The History of Three
Kingdoms/Assets/Python/Contrib/Sevopedia/SevoPediaCivilization.py
/trunk/The History of Three
Kingdoms/Assets/Python/Contrib/Sevopedia/SevoPediaHero.py
/trunk/The History of Three
Kingdoms/Assets/Python/Contrib/Sevopedia/SevoPediaMain.py
/trunk/The History of Three Kingdoms/Assets/Python/CvEventManager.py
/trunk/The History of Three Kingdoms/Assets/Python/CvGameUtils.py
/trunk/The History of Three
Kingdoms/Assets/Python/EntryPoints/CvScreensInterface.py
/trunk/The History of Three
Kingdoms/Assets/Python/Screens/CvCreateChampionScreen.py
/trunk/The History of Three Kingdoms/Assets/Python/Screens/CvHeroAdvisor.py
/trunk/The History of Three Kingdoms/Assets/Python/pyWB/CvWBDesc.py
/trunk/The History of Three
Kingdoms/Assets/XML/Civilizations/CIV4TraitInfos.xml
/trunk/The History of Three
Kingdoms/Assets/XML/GameInfo/CIV4GameOptionInfos.xml
/trunk/The History of Three
Kingdoms/Assets/XML/Text/CIV4GameText_Sanguo_Hero.xml
/trunk/The History of Three
Kingdoms/Assets/XML/Text/CIV4GameText_Sanguo_New.xml
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvEnums.h
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGame.cpp
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGame.h
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGameTextMgr.cpp
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGlobals.cpp
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGlobals.h
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvInfos.cpp
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvInfos.h
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvPlayer.cpp
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvPlayer.h
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvPlayerAI.cpp
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvSelectionGroup.cpp
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvUnit.cpp
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvUnit.h
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CyEnumsInterface.cpp
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CyGame.cpp
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CyGlobalContext.cpp
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CyGlobalContext.h
/trunk/The History of Three
Kingdoms/CvGameCoreDLL/CyGlobalContextInterface4.cpp
/trunk/The History of Three Kingdoms/Documents/changelog.txt
/trunk/The History of Three Kingdoms/Documents/changelog_en.txt
/trunk/The History of Three Kingdoms/PublicMaps/HoTK 51_51
196AD.CivBeyondSwordWBSave
/trunk/The History of Three Kingdoms/PublicMaps/HoTK 68_64
194AD.CivBeyondSwordWBSave
/trunk/The History of Three Kingdoms/PublicMaps/HoTK 68_64
196AD.CivBeyondSwordWBSave
/trunk/The History of Three Kingdoms/PublicMaps/HoTK 81_81
196AD.CivBeyondSwordWBSave
=======================================
--- /dev/null
+++ /trunk/The History of Three Kingdoms/Assets/Python/CvQuestManager.py
Tue Sep 29 23:51:43 2009
@@ -0,0 +1,147 @@
+## Sid Meier's Civilization 4
+## Copyright Firaxis Games 2005
+##
+## Jesse Smith - 06-2005
+## - Class to handle Quest Messaging
+## - Used by CvTutorial, interface in CvTutorialQuestScreen
+
+import CvUtil
+import CvAdvisorScreen
+import CvScreenEnums
+from CvPythonExtensions import *
+
+gc = CyGlobalContext()
+
+class CvQuestManager:
+ ' Class for Managing Quests '
+ def __init__(self):
+ #CvUtil.pyPrint("CvQuestManager.__init__ %s" %self)
+ self.__l_Quests = list()
+ self.__l_CompletedQuests = list()
+ self.__screenName = ""
+ self.__iScreenID = -1
+
+ def initQuestManager( self, strQuestType, argsList ):
+ #CvUtil.pyPrint( "CvQuestManager.initQuestManager" )
+ objective, update = argsList
+ self.strQuestType = strQuestType
+ self.strCurrentObjective = objective
+ self.strQuestUpdate = update
+
+ def setScreenValues( self, strScreenName, iScreenID ):
+ self.__screenName = strScreenName
+ self.__iScreenID = iScreenID
+
+ def getQuestScreen( self ):
+ if self.__iScreenID == CvScreenEnums.ADVISOR_SCREEN:
+ return CvAdvisorScreen.getAdvisor()
+
+ def showQuestScreen(self):
+ self.getQuestScreen().interfaceScreen()
+
+ def getCompletedQuestMessages( self ):
+ ' list - returns shown message list - called by CvAppInterface.onSave '
+ CvUtil.pyPrint( "CvQuestManager.getCompletedQuestMessages" )
+ return self.__l_CompletedQuests
+
+ def setCompletedQuestMessages( self, data ):
+ ' called by CvAppInterface.OnLoad '
+ CvUtil.pyPrint( "CvQuestManager.setCompletedQuestMessages" )
+ self.__l_ShownMessages = data
+
+ def loadQuestInfos( self ):
+ ' initializes data from dictionary_TutorialQuestInfo and adds them to
l_Quests '
+ CvUtil.pyPrint( "CvQuestManager.initQuestInfos (%s)" % self.strQuestType
)
+ [ self.__l_Quests.append(gc.getQuestInfo(i)) for i in
range(gc.getNumQuestInfos()) if self.strQuestType in
gc.getQuestInfo(i).getType() ]
+
+ def processQuest( self, strQuestInfoKey ):
+ ' handles the processing of the quest, main loop '
+ CvUtil.pyPrint( "CvQuestManager.processQuest (%s)" % strQuestInfoKey )
+
+ CyInterface().stop2DSound()
+
+ Quest = self.getQuest( strQuestInfoKey )
+
+ # if strQuestInfoKey has not been completed
+ if ( Quest and strQuestInfoKey not in self.__l_CompletedQuests):
+ # if the linked quest is not yet complete then process this quest
+ if ( not self.isQuestLinkComplete( Quest ) ):
+ # update CvTutorialQuestScreen
+ self.updateQuestObjective( Quest )
+ self.updateQuestBodyText( Quest )
+ self.displayImmediateMessage( Quest )
+ self.doQuestComplete( Quest )
+ return True
+
+ # otherwise process quest link
+ else:
+ CvUtil.pyPrint( "CvQuestManager.processQuest: Processing Quest (%s)
Link" % Quest.getType() )
+ self.doQuestLink( Quest )
+ return True
+ return False
+
+ def getQuest( self, strQuestInfoKey ):
+ ' returns a Quest object from the g_QuestInfos '
+ if self.__l_Quests:
+ for Quest in self.__l_Quests:
+ if ( Quest.getType() == strQuestInfoKey ):
+ return Quest
+ return None
+
+ def updateQuestObjective( self, Quest ):
+ ' updates the header text '
+ CvUtil.pyPrint( "CvQuestManager.updateQuestObjective (%s)" %
Quest.getType() )
+ if ( Quest.getQuestObjective() != "NONE" ):
+ self.playQuestSound(Quest)
+ objectiveText = u"%s %s" %( self.strCurrentObjective,
self.getQuestText(Quest.getQuestObjective()) )
+ self.getQuestScreen().updateHeader( objectiveText )
+
+ def updateQuestBodyText( self, Quest ):
+ ' updates the body text '
+ CvUtil.pyPrint( "CvQuestManager.updateQuestBodyText (%s)" %
Quest.getType() )
+ if ( Quest.getQuestBodyText() != "NONE" ):
+ bodyText = "%s" %( self.getQuestText(Quest.getQuestBodyText()), )
+ self.getQuestScreen().updateBodyText( bodyText )
+
+ def displayImmediateMessage( self, Quest ):
+ ' displays an immediate message '
+ CvUtil.pyPrint( "CvQuestManager.displayImmediateMessage (%s)" %
Quest.getType() )
+ if ( Quest.getNumQuestMessages() > 0 ):
+ for i in range( Quest.getNumQuestMessages() ):
+ messageText = "%s" %( self.getQuestText(Quest.getQuestMessages(i)),)
+ CyInterface().addImmediateMessage( messageText, "" )
+
+ def isQuestLinkComplete( self, Quest ):
+ ' test to see if the quests link has been completed or not '
+ CvUtil.pyPrint( "CvQuestManager.isQuestLinkComplete (%s)" %
Quest.getType() )
+ if ( Quest.getNumQuestLinks() > 0 ):
+ return ( Quest.getType() in self.__l_CompletedQuests )
+ return False
+
+ def doQuestComplete( self, Quest ):
+ ' marks a quest Complete '
+ CvUtil.pyPrint( "CvQuestManager.doQuestComplete (%s)" % Quest.getType() )
+ self.__l_CompletedQuests.append( Quest.getType() )
+
+ def getQuestText( self, strQuestInfoType ):
+ ' gets the Quest Text from the Translator '
+ CvUtil.pyPrint( "CvQuestManager.getQuestText (%s)" % strQuestInfoType )
+ return CyTranslator().getText(strQuestInfoType, tuple())
+
+ def getLastQuestType( self ):
+ ' returns the questinfo type for the last quest that was processed '
+ CvUtil.pyPrint( "CvQuestManager.getLastQuestType (%s)" %
self.__l_CompletedQuests[len(self.__l_CompletedQuests)-1] )
+ return self.__l_CompletedQuests[ len(self.__l_CompletedQuests) - 1 ]
+
+ def isQuestCompleted( self, strQuestInfoType ):
+ ' returns whether a questinfo type has been completed '
+ if ( strQuestInfoType in self.__l_CompletedQuests ):
+ return True
+ return False
+
+ def playQuestSound( self, Quest ):
+ ' plays a 2D sound for the quest '
+ CvUtil.pyPrint( "CvQuestManager.playQuestSound (%s)" % Quest.getType() )
+ questSound = Quest.getQuestSounds(0)
+ if questSound:
+ CyInterface().playGeneralSound(questSound)
=======================================
--- /dev/null
+++ /trunk/The History of Three
Kingdoms/Assets/Python/CvTutorialEventManager.py Tue Sep 29 23:51:43 2009
@@ -0,0 +1,538 @@
+## CvWonderEventManager
+## This file is part of Civilization IV Sanguo196AD mod.
+
+from CvPythonExtensions import *
+
+import CvScreensInterface
+
+import CvUtil
+import PyHelpers
+import Popup as PyPopup
+
+import Tutorial
+import CvTutorialAdvisorScreen
+import CvCameraControls
+import CvAdvisorUtils
+
+import sys
+
+gc = CyGlobalContext()
+localText = CyTranslator()
+PyPlayer = PyHelpers.PyPlayer
+PyInfo = PyHelpers.PyInfo
+
+# globals
+###################################################
+class CvTutorialEventManager:
+ def __init__(self, eventManager):
+ # private
+
+ self.eventManager = eventManager
+ self.screen = CvTutorialAdvisorScreen.tutorialAdvisorScreen
+ self.tutorial = Tutorial.tutorial
+
+ self.iUnitsCreated = 0
+
+ self.bCtrl = False
+ self.bShift = False
+ self.bAlt = False
+ self.bAllowCheats = False
+
+ # OnEvent Enums
+ self.EventLButtonDown=1
+ self.EventLcButtonDblClick=2
+ self.EventRButtonDown=3
+ self.EventBack=4
+ self.EventForward=5
+ self.EventKeyDown=6
+ self.EventKeyUp=7
+
+ eventManager.addEventHandler("kbdEvent", self.onKbdEvent)
+ eventManager.addEventHandler("GameStart", self.onGameStart)
+ eventManager.addEventHandler("GameEnd", self.onGameEnd)
+ eventManager.addEventHandler("cityBuildingUnit", self.onCityBuildingUnit)
+ eventManager.addEventHandler("windowActivation", self.onWindowActivation)
+ eventManager.addEventHandler("cityBuildingBuilding",
self.onCityBuildingBuilding)
+ eventManager.addEventHandler("unitSelected", self.onUnitSelected)
+ eventManager.addEventHandler("unitMove", self.onUnitMove)
+ eventManager.addEventHandler("BeginPlayerTurn", self.onBeginPlayerTurn)
+ eventManager.addEventHandler("cityBuilt", self.onCityBuilt)
+ eventManager.addEventHandler("unitCreated", self.onUnitCreated)
+ eventManager.addEventHandler("BeginGameTurn", self.onBeginGameTurn)
+ eventManager.addEventHandler("mouseEvent", self.onMouseEvent)
+ eventManager.addEventHandler("improvementBuilt", self.onImprovementBuilt)
+ eventManager.addEventHandler("routeBuilt", self.onRouteBuilt)
+ eventManager.addEventHandler("buildingBuilt", self.onBuildingBuilt)
+ eventManager.addEventHandler("unitPromoted", self.onUnitPromoted)
+ eventManager.addEventHandler("techSelected", self.onTechSelected)
+ eventManager.addEventHandler("techAcquired", self.onTechAcquired)
+ eventManager.addEventHandler("firstContact", self.onFirstContact)
+ eventManager.addEventHandler("combatResult", self.onCombatResult)
+ eventManager.addEventHandler("religionFounded", self.onReligionFounded)
+ eventManager.addEventHandler("Update", self.onUpdate)
+
+#################### ON EVENTS ######################
+
+ def onKbdEvent(self, argsList):
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ eventType,key,mx,my,px,py = argsList
+
+ if ( eventType == self.EventKeyDown ):
+ theKey=int(key)
+
+ if self.tutorial.bConsumeKeyboardInput == True:
+ return 1
+
+ # Shift - T (Debug - No MP)
+# if ( theKey == int(InputTypes.KB_J) and self.bCtrl and self.bAlt ):
+# return 0
+ if ( theKey == int(InputTypes.KB_C) and
self.screen.bWaitForRecenterToContinue == True ):
+ self.screen.bWaitForRecenterToContinue = False
+ #self.screen.doLeaderheadApproval()
+ self.screen.doNextInfo()
+ if ( theKey == int(InputTypes.KB_ESCAPE) and
self.tutorial.bWaitForEscapeCityScreen == True ):
+ self.tutorial.bWaitForEscapeCityScreen = False
+ self.tutorial.bWatchCityScreen = False
+
+ self.screen.doNextInfo()
+ if ( theKey == int(InputTypes.KB_RETURN) and
self.tutorial.bWaitForEscapeCityScreen == True ):
+ self.tutorial.bWaitForEscapeCityScreen = False
+ self.tutorial.bWatchCityScreen = False
+ self.screen.doNextInfo()
+ print (" In CvTutorialEventManager....")
+
+ def onGameStart(self, argsList):
+ 'Called at the start of the game'
+
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ self.setTutorialOption(PlayerOptionTypes.PLAYEROPTION_WAIT_END_TURN,
True)
+
self.setTutorialOption(PlayerOptionTypes.PLAYEROPTION_SHOW_FRIENDLY_MOVES,
True)
+ self.setTutorialOption(PlayerOptionTypes.PLAYEROPTION_SHOW_ENEMY_MOVES,
True)
+ # this is also set at the beginning of every player turn
+ self.setTutorialOption(PlayerOptionTypes.PLAYEROPTION_START_AUTOMATED,
False)
+ # only allow english to have numpad
+ self.setTutorialOption(PlayerOptionTypes.PLAYEROPTION_NUMPAD_HELP, False)
+ if CyGame().getCurrentLanguage() == 0:
+ self.setTutorialOption(PlayerOptionTypes.PLAYEROPTION_NUMPAD_HELP, True)
+
+ gc.getPlayer(0).setFeatAccomplished(FeatTypes.FEAT_UNITCOMBAT_MELEE,
True)
+ gc.getPlayer(0).setFeatAccomplished(FeatTypes.FEAT_TRADE_ROUTE, True)
+
+ self.screen.startTutorial(self.screen.FirstTutorialInfoType)
+ self.screen.setCloseOnEscape(false)
+ self.tutorial.setHighAdvisorCenter()
+
+ def setTutorialOption(self, iOption, bOn = True):
+ CyMessageControl().sendPlayerOption(int(iOption), bOn)
+
+ def onGameEnd(self, argsList):
+ 'Called at the End of the game'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ self.screen.clearScreen()
+ return
+
+ def onCityBuildingUnit(self, argsList):
+ 'City begins building a unit'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ pCity = argsList[0]
+ iUnitType = argsList[1]
+ CvUtil.pyPrint("%s has begun building
a %s" %(pCity.getName(),gc.getUnitInfo(iUnitType).getDescription()))
+ if self.tutorial.bWaitForBuildSelectionWarrior and iUnitType ==
CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),"UNIT_WARRIOR"):
+ self.tutorial.bWaitForBuildSelectionWarrior = False
+ print ("doNextInfo onCityBuildingUnit1")
+ self.screen.doNextInfo()
+ if self.tutorial.bWaitForBuildSelectionScout and iUnitType ==
CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),"UNIT_SCOUT"):
+ self.tutorial.bWaitForBuildSelectionScout = False
+ print ("doNextInfo onCityBuildingUnit2")
+ self.screen.doNextInfo()
+ if self.tutorial.bWaitForBuildSelectionWorker and iUnitType ==
CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),"UNIT_WORKER"):
+ self.tutorial.bWaitForBuildSelectionWorker = False
+ print ("doNextInfo onCityBuildingUnit3")
+ self.screen.doNextInfo()
+ if self.tutorial.bWaitForBuildSelectionSettler and iUnitType ==
CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),"UNIT_SETTLER"):
+ self.tutorial.bWaitForBuildSelectionSettler = False
+ print ("doNextInfo onCityBuildingUnit4")
+ self.screen.doNextInfo()
+
+ def onWindowActivation(self, argsList):
+ 'Called when the game window activates or deactivates'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ bActive = argsList[0]
+ if bActive and self.tutorial.bTutorialBegun and
self.screen.getScreen().isActive():
+ if self.tutorial.bTutorialComplete == False:
+ self.screen.doScreenRefresh ()
+ self.screen.setLeaderheadAdvisor( 0 )
+ if self.tutorial.bHideContinueButton:
+ self.screen.doHideOKButton()
+
+
+ def onCityBuildingBuilding(self, argsList):
+ 'City begins building a Building'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ pCity = argsList[0]
+ iBuildingType = argsList[1]
+ CvUtil.pyPrint("%s has begun building
a %s" %(pCity.getName(),gc.getBuildingInfo(iBuildingType).getDescription()))
+ if self.tutorial.bWaitForBuildSelectionObelisk:
+ self.tutorial.bWaitForBuildSelectionObelisk = False
+ print ("doNextInfo onCityBuildingBuilding1")
+ self.screen.doNextInfo()
+ if self.tutorial.bWaitForBuildSelectionBarracks:
+ self.tutorial.bWaitForBuildSelectionBarracks = False
+ print ("doNextInfo onCityBuildingBuilding2")
+ self.screen.doNextInfo()
+ if self.tutorial.bWaitForBuildSelectionStonehenge:
+ self.tutorial.bWaitForBuildSelectionStonehenge = False
+ print ("doNextInfo onCityBuildingBuilding3")
+ self.screen.doNextInfo()
+
+ def onUnitSelected(self, argsList):
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ unit = argsList[0]
+ iOwner = unit.getOwner()
+ player = PyPlayer(iOwner)
+ if self.tutorial.bWaitForSelectedUnit:
+ if unit.getScriptData() == self.tutorial.SelectedUnit:
+ self.tutorial.bWaitForSelectedUnit = False
+ self.screen.bWaitToContinue = False
+ print ("doNextInfo onUnitSelected")
+ self.screen.doNextInfo()
+
+ def onUnitMove(self, argsList):
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ pPlot,pUnit = argsList
+ if self.tutorial.bWaitForReturnFirstCity == True:
+ if pUnit.getScriptData() == "FIRST_WARRIOR" and pPlot.getX() == 33 and
pPlot.getY() == 14:
+ self.tutorial.bWaitForReturnFirstCity = False
+ self.screen.doNextInfo()
+ if self.tutorial.bWaitForMoveToSecondCity:
+ if pUnit.getScriptData() == "SECOND_SETTLER" and pPlot.getX() == 34 and
pPlot.getY() == 9:
+ self.tutorial.bWaitForMoveToSecondCity = False
+ self.screen.doNextInfo()
+ if self.tutorial.bWaitForWorkerArriveStone == True:
+ if pUnit.getUnitType() == CvUtil.findInfoTypeNum(gc.getUnitInfo,
gc.getNumUnitInfos(), "UNIT_WORKER") and pPlot.getX() == 33 and
pPlot.getY() == 10:
+ self.tutorial.bWaitForWorkerArriveStone = False
+ self.screen.doNextInfo()
+
+ def onBeginPlayerTurn(self, argsList):
+ 'Called at the beginning of a players turn'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ iGameTurn, iPlayer = argsList
+ player = gc.getPlayer(iPlayer)
+ # to prevent the worker from starting and thus breaking progression
+ self.setTutorialOption(PlayerOptionTypes.PLAYEROPTION_START_AUTOMATED,
False)
+ if iPlayer == 0:
+ if not self.tutorial.bTutorialComplete:
+ for i in range (player.getNumCities()):
+ if player.getCity(i).isProductionAutomated():
+ player.getCity(i).setProductionAutomated ( False )
+
+ if self.tutorial.bWaitForBeginPlayerTurn:
+ self.tutorial.bWaitForBeginPlayerTurn = False
+ self.screen.doNextInfo()
+ if self.tutorial.bIncreasedProductionRome:
+ self.tutorial.FirstCity.changeProduction(8)
+
+ def onCityBuilt(self, argsList):
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ city = argsList[0]
+ if (city.getOwner() == 0 and gc.getPlayer(0).getNumCities() == 1):
+ self.tutorial.FirstCity = city
+ self.tutorial.bWaitForUnitAction = False
+ self.screen.doNextInfo()
+ if (city.getOwner() == 0 and gc.getPlayer(0).getNumCities() == 2):
+ self.tutorial.SecondCity = city
+ self.tutorial.bWaitForUnitAction = False
+ self.screen.doNextInfo()
+
+ def onUnitCreated(self, argsList):
+ 'Unit Completed'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ unit = argsList[0]
+ iOwner = unit.getOwner()
+ player = PyPlayer(iOwner)
+ print ("Unit is %s" %(unit.getUnitType()))
+ if iOwner == 0:
+ self.iUnitsCreated += 1
+ print ("%s units have been created" %(self.iUnitsCreated))
+ if self.iUnitsCreated == 2:
+ unit.setScriptData("FIRST_WARRIOR")
+ print ("Warrior is named")
+ elif self.iUnitsCreated == 3:
+ unit.setScriptData("FIRST_SCOUT")
+ elif self.iUnitsCreated == 4:
+ unit.setScriptData("FIRST_WORKER")
+ elif self.iUnitsCreated == 5:
+ unit.setScriptData("SECOND_WARRIOR")
+ elif self.iUnitsCreated == 6:
+ unit.setScriptData("SECOND_SETTLER")
+
+ if self.tutorial.bWaitForWorkerToFinishBuilding and unit.getUnitType()
==
CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),"UNIT_WORKER"):
+ self.tutorial.bWaitForWorkerToFinishBuilding = False
+ self.screen.doNextInfo()
+ if self.tutorial.bWaitForWarriorToFinishBuilding and unit.getUnitType()
==
CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),"UNIT_WARRIOR"):
+ self.tutorial.bWaitForWarriorToFinishBuilding = False
+ self.screen.doNextInfo()
+ if self.tutorial.bWaitForSettlerToFinishBuilding and unit.getUnitType()
==
CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),"UNIT_SETTLER"):
+ self.tutorial.bWaitForSettlerToFinishBuilding = False
+ self.screen.doNextInfo()
+
+ def onBeginGameTurn(self, argsList):
+ 'Called at the beginning of the end of each turn'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ iGameTurn = argsList[0]
+ if not self.tutorial.bTutorialComplete:
+ self.setTutorialOption(PlayerOptionTypes.PLAYEROPTION_AUTO_PROMOTION,0)
+
+ def onMouseEvent(self, argsList):
+ 'mouse handler - returns 1 if the event was consumed'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ eventType,mx,my,px,py,interfaceConsumed,screens = argsList
+ if self.tutorial.bDisableMainInteraceMouseInput == True and screens ==
99:
+ return 1
+
+ if ( px!=-1 and py!=-1 ):
+ if self.tutorial.bCannotMouseMapInput == True:
+ return 1
+ if self.tutorial.bWaitForEscapeCityScreen == True:
+ return 1
+ if eventType == self.EventLcButtonDblClick and px != -1 and py != -1:
+ if CyMap().plot(px,py).isCity():
+ if self.tutorial.bCanOpenCityScreen == False:
+ self.tutorial.doErrorPopup("TXT_KEY_TUTORIAL_ERROR_CANNOT_OPEN_CITY")
+ return True
+ if self.tutorial.bWaitForOpenCityScreen == True:
+ self.tutorial.bWaitForOpenCityScreen = False
+ print ("doNextInfo onMouseEvent")
+ self.screen.doNextInfo()
+
+ if ( eventType == self.EventLButtonDown ):
+
+ if ( self.bCtrl and self.bAlt and CyMap().plot(px,py).isCity() and not
interfaceConsumed):
+ # Launch Edit City Event
+ self.beginEvent( CvUtil.EventEditCity, (px,py) )
+ return 1
+
+ elif ( self.bCtrl and self.bShift and not interfaceConsumed):
+ # Launch Place Object Event
+ self.beginEvent( CvUtil.EventPlaceObject, (px, py) )
+ return 1
+
+ elif ( eventType == self.EventBack ):
+ return CvScreensInterface.handleBack()
+ elif ( eventType == self.EventForward ):
+ return CvScreensInterface.handleForward()
+
+ return 0
+
+ def onImprovementBuilt(self, argsList):
+ 'Improvement Built'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ iImprovement, iX, iY = argsList
+ if self.tutorial.bWaitForWorkerToBuild:
+ if iImprovement ==
CvUtil.findInfoTypeNum(gc.getImprovementInfo,gc.getNumImprovementInfos(),"IMPROVEMENT_FARM")
and iX == 32 and iY == 13:
+ self.tutorial.bWaitForWorkerToBuild = False
+ self.tutorial.bWaitForBeginPlayerTurn = True
+ elif iImprovement ==
CvUtil.findInfoTypeNum(gc.getImprovementInfo,gc.getNumImprovementInfos(),"IMPROVEMENT_COTTAGE")
and iX == 32 and iY == 14:
+ self.tutorial.bWaitForWorkerToBuild = False
+ self.tutorial.bWaitForBeginPlayerTurn = True
+ elif iImprovement ==
CvUtil.findInfoTypeNum(gc.getImprovementInfo,gc.getNumImprovementInfos(),"IMPROVEMENT_MINE")
and iX == 32 and iY == 15:
+ self.tutorial.bWaitForWorkerToBuild = False
+ self.tutorial.bWaitForBeginPlayerTurn = True
+ elif iImprovement ==
CvUtil.findInfoTypeNum(gc.getImprovementInfo,gc.getNumImprovementInfos(),"IMPROVEMENT_QUARRY")
and iX == 33 and iY == 10:
+ self.tutorial.bWaitForWorkerToBuild = False
+ self.tutorial.bWaitForBeginPlayerTurn = True
+
+
+ def onRouteBuilt(self, argsList):
+ 'Route Built'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ iRoute, iX, iY = argsList
+ if self.tutorial.bWaitForWorkerToBuildRoad:
+ if iRoute ==
CvUtil.findInfoTypeNum(gc.getRouteInfo,gc.getNumRouteInfos(),"ROUTE_ROAD"):
+ if self.tutorial.bWaitForWorkerToBuildRoad == True:
+ if iX == 33 and iY == 13:
+ self.tutorial.bWaitForWorkerToBuildRoad = False
+ self.screen.doNextInfo()
+ if iX == 32 and iY == 13:
+ self.tutorial.bWaitForWorkerToBuildRoad = False
+ self.screen.doNextInfo()
+
+ def onBuildingBuilt(self, argsList):
+ 'Building Completed'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ pCity, iBuildingType = argsList
+ game = CyGame()
+
+ if self.tutorial.bTutorialComplete:
+ if ((not self.bMultiPlayer) and (pCity.getOwner() ==
CyGame().getActivePlayer()) and
isWorldWonderClass(gc.getBuildingInfo(iBuildingType).getBuildingClassType())):
+ # If this is a wonder...
+ popupInfo = CyPopupInfo()
+
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
+ popupInfo.setData1(iBuildingType)
+ popupInfo.setData2(pCity.getID())
+ popupInfo.setData3(0)
+ popupInfo.setText(u"showWonderMovie")
+ popupInfo.addPopup(pCity.getOwner())
+
+ CvAdvisorUtils.buildingBuiltFeats(pCity, iBuildingType)
+
+ if self.tutorial.bWaitForBarracksToBuild:
+ if iBuildingType ==
CvUtil.findInfoTypeNum(gc.getBuildingInfo,gc.getNumBuildingInfos(),"BUILDING_BARRACKS"):
+ self.tutorial.bWaitForBarracksToBuild = False
+ print ("doNextInfo onBuildingBuilt")
+ self.screen.doNextInfo()
+
+ def onUnitPromoted(self, argsList):
+ 'Unit Promoted'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ pUnit, iPromotion = argsList
+ player = PyPlayer(pUnit.getOwner())
+ CvUtil.pyPrint('Unit Promotion Event: %s
- %s' %(player.getCivilizationName(), pUnit.getName(),))
+ if self.tutorial.bWaitForPromotion:
+ self.tutorial.bWaitForPromotion = False
+ self.tutorial.bWaitForUnitAction = False
+ print ("doNextInfo onUnitPromoted")
+ self.screen.doNextInfo()
+
+ def onTechSelected(self, argsList):
+ 'Tech Selected'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ iTechType, iPlayer = argsList
+ if self.tutorial.bWaitForResearchSelection and iPlayer == 0:
+ self.tutorial.bWaitForResearchSelection = False
+ print ("doNextInfo onTechSelected")
+ self.screen.doNextInfo()
+
+ def onTechAcquired(self, argsList):
+ 'Tech Acquired'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ iTechType, iTeam, iPlayer, bAnnounce = argsList
+ # Note that iPlayer may be NULL (-1) and not a refer to a player object
+
+ if self.tutorial.bWaitForResearchDiscovered and iTeam == 0:
+ self.tutorial.bWaitForResearchDiscovered = False
+ self.screen.doNextInfo()
+
+ # Show tech splash when applicable
+ if self.tutorial.bShowTechSplash:
+ if (iPlayer > -1 and bAnnounce == true):
+ if (gc.getGame().isFinalInitialized() and not
gc.getGame().GetWorldBuilderMode()):
+ if ((not self.bMultiPlayer) and (iPlayer ==
CyGame().getActivePlayer())):
+ popupInfo = CyPopupInfo()
+
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
+ popupInfo.setData1(iTechType)
+ popupInfo.setText(u"showTechSplash")
+ popupInfo.addPopup(iPlayer)
+
+ def onFirstContact(self, argsList):
+ 'Contact'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ iTeamX,iHasMetTeamY = argsList
+ CvUtil.pyPrint('Team %d has met Team %d' %(iTeamX, iHasMetTeamY))
+ if self.tutorial.bWaitForFirstContact:
+ self.tutorial.bWaitForFirstContact = False
+ print ("doNextInfo onFirstContact")
+ self.screen.doNextInfo()
+
+ def onCombatResult(self, argsList):
+ 'Combat Result'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ pWinner,pLoser = argsList
+ if self.tutorial.bWaitForUnitCombat:
+ self.tutorial.bWaitForUnitCombat = False
+ print ("doNextInfo onCombatResults")
+ self.screen.doNextInfo()
+
+ def onReligionFounded(self, argsList):
+ 'Religion Founded'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ iReligion, iFounder = argsList
+ player = PyPlayer(iFounder)
+ iCityId = gc.getGame().getHolyCity(iReligion).getID()
+ if self.tutorial.bTutorialComplete:
+ if (gc.getGame().isFinalInitialized() and not
gc.getGame().GetWorldBuilderMode()):
+ if ((not self.bMultiPlayer) and (iFounder ==
CyGame().getActivePlayer())):
+ popupInfo = CyPopupInfo()
+
popupInfo.setButtonPopupType(ButtonPopupTypes.BUTTONPOPUP_PYTHON_SCREEN)
+ popupInfo.setData1(iReligion)
+ popupInfo.setData2(iCityId)
+ popupInfo.setData3(1)
+ popupInfo.setText(u"showWonderMovie")
+ popupInfo.addPopup(iFounder)
+
+ def onUpdate(self, argsList):
+ 'Called every frame'
+ if (gc.getGame().getTutorialID() == -1):
+ return 0
+
+ fDeltaTime = argsList[0]
+
+ if self.tutorial.bWatchCityScreen:
+ if not CyInterface().isCityScreenUp():
+ self.tutorial.bWatchCityScreen = False
+ self.tutorial.bWaitForEscapeCityScreen = False
+ self.screen.doNextInfo()
+
+ if self.tutorial.bTutorialBegun:
+ if not self.tutorial.bTutorialComplete:
+ self.screen.show( "Background" )
+
+ # allow camera to be updated
+ CvCameraControls.g_CameraControls.onUpdate( fDeltaTime )
+
+#################### TRIGGERED EVENTS ##################
+
+#################### AUXILIARY METHOD ##################
+
+ def doDebug(self,text):
+ CyInterface().addMessage(0, False, 0, '#DEBUG# ' + text, "", 0, "",
CyGame().getReplayMessageColor(0), 0, 0, False, False)
+
+ def doPopup(self, text):
+ popup = PyPopup.PyPopup()
+ popup.setBodyString(text)
+ popup.launch()
+
=======================================
--- /dev/null
+++ /trunk/The History of Three
Kingdoms/Assets/Python/Screens/CvTutorialAdvisorScreen.py Tue Sep 29
23:51:43 2009
@@ -0,0 +1,893 @@
+import CvScreenEnums
+import ScreenInput
+import CvAdvisorScreen
+import Tutorial
+import CvUtil
+import PyHelpers
+import BugUtil
+from CvPythonExtensions import *
+
+# globals
+gc = CyGlobalContext()
+TEXT_AREA_ADVISOR = 0
+TEXT_AREA_DEBUG = 1
+
+TUTORIAL_ADVISOR_SCREEN_ID = 2000
+
+ArtFileMgr = CyArtFileMgr()
+
+class CvTutorialAdvisorScreen(CvAdvisorScreen.CvAdvisorScreen):
+
+ advisorButtons={
+# 'Previous' :
("Previous","Previous","",255,160,120,30,WidgetTypes.WIDGET_GENERAL,-1,-1,ButtonStyles.BUTTON_STYLE_STANDARD),
+
'Continue':("Continue","Continue","",690,164,120,30,WidgetTypes.WIDGET_GENERAL,-1,-1,ButtonStyles.BUTTON_STYLE_STANDARD),
+ 'End Tutorial':("End Tutorial","End
Tutorial","",400,164,120,30,WidgetTypes.WIDGET_GENERAL,-1,-1,ButtonStyles.BUTTON_STYLE_STANDARD),
+#
'Reset':("Reset","Reset","",750,160,120,30,WidgetTypes.WIDGET_GENERAL,-1,-1,ButtonStyles.BUTTON_STYLE_STANDARD),
+ }
+ FirstTutorialInfoType = "TUTORIAL_INTRODUCTION"
+
+ WIDGET_ID = "TutorialAdvisorWidget"
+
+ def __init__(self):
+ CvAdvisorScreen.CvAdvisorScreen.__init__(self)
+ self.setScreenValues("TutorialAdvisorScreen", TUTORIAL_ADVISOR_SCREEN_ID)
+ self.parent = CvAdvisorScreen.CvAdvisorScreen
+ self.tutorial = Tutorial.tutorial
+ self.nWidgetCount = 0
+ self.resetTutorialScreen()
+ self.iBackgroundX = 120
+ self.iBackgroundY = 48
+
+ def resetTutorialScreen(self):
+ self.bPassInput = True
+ self.bWaitToContinue = False
+ self.bWaitForRecenterToContinue = False
+ self.__iMessageCount = 0
+ self.__iCompletedTutorialInfos = 0
+ self.__l_TutorialInfos = []
+ self.resetActiveTutorialInfo()
+
+ def startTutorial(self, tutorialInfo):
+ self.tutorial.resetTutorial()
+ self.resetTutorialScreen()
+ ContinueButtonText = CyTranslator().getText("TXT_KEY_SCREEN_CONTINUE",())
+ EndButtonText = CyTranslator().getText("TXT_KEY_SCREEN_END_TUTORIAL",())
+ self.advisorButtons['Continue'] = ("Continue", ContinueButtonText, "",
690,164,120,30,WidgetTypes.WIDGET_GENERAL,-1,-1,ButtonStyles.BUTTON_STYLE_STANDARD)
+ self.advisorButtons['End Tutorial'] = ("End Tutorial",
EndButtonText, "",
400,164,120,30,WidgetTypes.WIDGET_GENERAL,-1,-1,ButtonStyles.BUTTON_STYLE_STANDARD)
+ self.clearScreen()
+ self.interfaceScreen()
+ self.setLeaderheadAdvisor( 0 ) # ADVISOR_GROWTH
+ if tutorialInfo:
+ self.processTutorialInfoByType(tutorialInfo)
+ else:
+ self.processTutorialInfoByType(self.FirstTutorialInfoType)
+
+ def doNextInfo(self):
+ self.__doEndTutorialInfo()
+
+ def __doBeginTutorialInfo(self):
+ print "__doBeginTutorialInfo -> %s" %self.activeTutorialInfo.getType()
+ tutorialInfoType = self.activeTutorialInfo.getType()
+# if tutorialInfoType == "TUTORIAL_INTRODUCTION":
+# self.tutorial.doWaitForSelected("SETTLER_1")
+ def __doEndTutorialInfo(self):
+ print "__doEndTutorialInfo -> %s" %self.activeTutorialInfo.getType()
+ tutorialInfoType = self.activeTutorialInfo.getType()
+# if tutorialInfoType == "TUTORIAL_FIRST_MOVEMENT":
+# self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO, "", "",
self.tutorial.FirstCityPlot)
+# return self.processTutorialInfoByType("TUTORIAL_FIRST_FOUND_CITY")
+# elif tutorialInfoType == "TUTORIAL_FIRST_":
+# self.tutorial.setWaitForAction(MissionTypes.MISSION_FOUND, "", "",
self.tutorial.FirstCityPlot)
+ # info is complete, reset activeTutorialInfo and MessageCount - but
FIRST, get NextTutorialInfoType
+ nextTutorialInfoType = self.activeTutorialInfo.getNextTutorialInfoType()
+ self.doTutorialInfoComplete(self.activeTutorialInfo.getType())
+ self.resetActiveTutorialInfo()
+ # start next message if there is one
+ if nextTutorialInfoType != "NONE":
+ self.processTutorialInfoByType(nextTutorialInfoType)
+ def doScript(self, scriptName):
+
+ xResolution = self.getScreen().getXResolution()
+ yResolution = self.getScreen().getYResolution()
+
+ iWarrior =
CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),"UNIT_WARRIOR")
+ iScout =
CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),"UNIT_SCOUT")
+ iObelisk =
CvUtil.findInfoTypeNum(gc.getBuildingInfo,gc.getNumBuildingInfos(),"BUILDING_OBELISK")
+ iWorker =
CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),"UNIT_WORKER")
+ iBarracks =
CvUtil.findInfoTypeNum(gc.getBuildingInfo,gc.getNumBuildingInfos(),"BUILDING_BARRACKS")
+ iSettler =
CvUtil.findInfoTypeNum(gc.getUnitInfo,gc.getNumUnitInfos(),"UNIT_SETTLER")
+ iStonehenge =
CvUtil.findInfoTypeNum(gc.getBuildingInfo,gc.getNumBuildingInfos(),"BUILDING_STONEHENGE")
+
+ if scriptName == "TOP":
+ return
+ #Interface Scripts
+ elif scriptName == "HIDE_INTERFACE_ALL":
+ CyInterface().setShowInterface(InterfaceVisibility.INTERFACE_HIDE_ALL)
+ elif scriptName == "MINIMAL_INTERFACE":
+ CyInterface().setShowInterface(InterfaceVisibility.INTERFACE_HIDE)
+ elif scriptName == "SHOW_INTERFACE_ALL":
+ CyInterface().setShowInterface(InterfaceVisibility.INTERFACE_SHOW)
+
+ #Advisor Screen Scripts **** these scripts must be called last since
scripts following them don't run****
+ elif scriptName == "HIDE_ADVISOR_OK_BUTTON":
+ self.tutorial.bHideContinueButton = True
+ self.doHideOKButton()
+ elif scriptName == "SHOW_ALL_ADVISOR_BUTTONS":
+ self.tutorial.bHideContinueButton = False
+ self.doShowAllButtons()
+ elif scriptName == "SHOW_END_TUTORIAL_BUTTON":
+ self.tutorial.bHideContinueButton = True
+ self.doShowEndTutorialButtons()
+ elif scriptName == "HIDE_END_TUTORIAL_BUTTON":
+ self.doHideEndTutorialButton()
+
+ #Camera Scripts
+ elif scriptName == "CAMERA_RESET_ALL":
+ CyCamera().ResetZoom()
+
+ elif scriptName == "CAMERA_FOCUS_GAME_START_BLACKNESS":
+ CyCamera().SimpleLookAt(NiPoint3(45.779320,-1448.957397,1654.818970),
NiPoint3(0,0,0))
+ elif scriptName == "CAMERA_FOCUS_UNIT_FLAG":
+ CyCamera().SimpleLookAt( NiPoint3( 2188.282715, -42.710007, 467.137817
),NiPoint3( 2151.465332, 765.179077, 49.500000))
+ elif scriptName == "CAMERA_FOCUS_FIRST_SETTLE_PLOT_INDICATOR":
+ CyCamera().SimpleLookAt( NiPoint3 ( 2301.432373, -1106.147461,
1363.551636), NiPoint3( 2246.625000, 628.593750, 121.599998 ) )
+
+
+ elif scriptName == "CAMERA_NORMAL_FIRST_SETTLER":
+ CyCamera().LookAtUnit( PyHelpers.PyPlayer(
gc.getGame().getActivePlayer() ).getUnitByScriptData( "FIRST_SETTLER" ) )
+ elif scriptName == "CAMERA_FOCUS_FIRST_SETTLER":
+ CyCamera().SimpleLookAt(NiPoint3(
2815.484,296.344,411.070),self.centerCameraFocus(PyHelpers.PyPlayer(gc.getGame().getActivePlayer()).getUnitByScriptData("FIRST_SETTLER").plot()))
+ elif scriptName == "CAMERA_RESET_FIRST_SETTLER":
+
CyCamera().SimpleLookAt(NiPoint3(2292.250488,-529.876099,824.148438),self.centerCameraFocus(PyHelpers.PyPlayer(gc.getGame().getActivePlayer()).getUnitByScriptData("FIRST_SETTLER").plot()))
+
+ elif scriptName == "CAMERA_FOCUS_FIRST_WARRIOR":
+ CyCamera().SimpleLookAt( NiPoint3 ( 1631.293213, -63.911133, 632.493896
),self.centerCameraFocus( PyHelpers.PyPlayer(
gc.getGame().getActivePlayer()
).getUnitByScriptData("FIRST_WARRIOR").plot() ) )
+ elif scriptName == "CAMERA_NORMAL_FIRST_WARRIOR":
+ CyCamera().LookAtUnit( PyHelpers.PyPlayer(
gc.getGame().getActivePlayer() ).getUnitByScriptData( "FIRST_WARRIOR" ) )
+ elif scriptName == "CAMERA_RESET_FIRST_WARRIOR":
+ CyCamera().SimpleLookAt( NiPoint3( 2292.250488, -529.876099, 824.148438
),self.centerCameraFocus(PyHelpers.PyPlayer(gc.getGame().getActivePlayer()).getUnitByScriptData("FIRST_WARRIOR").plot()))
+
+ elif scriptName == "CAMERA_FOCUS_LION":
+ CyCamera().SimpleLookAt( NiPoint3( 2160.480957, 511.886169, 433.550110
),NiPoint3( 2842.443359, 78.288330, 49.500000))
+
+ elif scriptName == "CAMERA_FOCUS_FIRST_CITY":
+ CyCamera().SimpleLookAt( NiPoint3( 3245.336182, -23.306644,
567.403564), NiPoint3( 2374.620605, 478.554016, 49.500000 ) )
+
+ elif scriptName == "CAMERA_FOCUS_FIRST_TRIBAL_VILLAGE":
+ CyCamera().SimpleLookAt( NiPoint3 ( 2211.455566, 367.872192,
415.453064), NiPoint3( 1498.852539, 982.693726, 49.500000 ) )
+ elif scriptName == "CAMERA_SCOUT_FAR_OFF_FIRST_TRIBAL":
+ CyCamera().SimpleLookAt( NiPoint3 ( 3330.408936, -92.627449,
437.059082), NiPoint3( 2176.128662, 624.421265, 49.500000 ) )
+ elif scriptName == "CAMERA_SCOUT_FIRST_TRIBAL_PULLED_BACK":
+ CyCamera().SimpleLookAt( NiPoint3 ( 1837.916260, -246.860291,
4111.348633), NiPoint3( 1849.247559, 593.011108, 49.499756 ) )
+
+ elif scriptName == "CAMERA_SCOUT_FAR_OFF_SECOND_TRIBAL":
+ CyCamera().SimpleLookAt( NiPoint3 ( 2328.032227, 616.066772,
594.285889), NiPoint3( 1047.814697, 1148.103760, 49.500000 ) )
+
+ elif scriptName == "CAMERA_NORMAL_FIRST_SCOUT":
+ CyCamera().LookAtUnit( PyHelpers.PyPlayer(
gc.getGame().getActivePlayer() ).getUnitByScriptData( "FIRST_SCOUT" ) )
+
+ elif scriptName == "CAMERA_RESET_FIRST_CITY":
+ CyCamera().JustLookAtPlot(CyMap().plot(32,14))
#SimpleLookAt(NiPoint3(2292.250488,-529.876099,824.148438),self.centerCameraFocusOnPlot(CyMap().plot(32,14)))
+
+ elif scriptName == "CAMERA_FOCUS_ON_FARM_LOC":
+ CyCamera().SimpleLookAt( NiPoint3 ( 3081.707031, -559.818787,
665.521912), NiPoint3( 2244.266357, 240.791351, 49.499992 ) )
+ elif scriptName == "CAMERA_FOCUS_ON_COTTAGE_LOC":
+ CyCamera().SimpleLookAt( NiPoint3 ( 1095.563721, -291.925354,
835.348999), NiPoint3( 2182.654785, 474.229187, 49.500000 ) )
+ elif scriptName == "CAMERA_FOCUS_ON_MINE_LOC":
+ CyCamera().SimpleLookAt( NiPoint3 ( 1319.161133, 275.170929,
773.606262), NiPoint3( 2320.789063, 701.790894, 49.500000 ) )
+
+ elif scriptName == "CAMERA_SECOND_SETTLER_BLUE_CIRCLE":
+ CyCamera().SimpleLookAt( NiPoint3 ( 2394.521484, -2199.017334,
4431.910156), NiPoint3( 2342.834473, -87.778557, 49.499992 ) )
+
+ elif scriptName == "CAMERA_FOCUS_SECOND_CITY":
+ CyCamera().SimpleLookAt( NiPoint3 ( 3581.761963, -1392.432251,
755.416687), NiPoint3( 2589.805664, -469.913513, 49.500008 ) )
+
+ elif scriptName == "CAMERA_FOCUS_STONE":
+ CyCamera().SimpleLookAt( NiPoint3 ( 1676.681396, -1113.909668,
667.913940), NiPoint3( 2429.639160, -196.660477, 49.500008 ) )
+
+ elif scriptName == "CAMERA_FOCUS_ROME_QUARRY":
+ CyCamera().SimpleLookAt( NiPoint3 ( 2566.888672, -2178.979004,
2573.208984), NiPoint3( 2482.364746, 39.256107, 49.500000 ) )
+
+ elif scriptName == "CAMERA_FOCUS_WORKER":
+
CyCamera().SimpleLookAt(NiPoint3(2371.228,-23.4439,470.1647),self.centerCameraFocus(PyHelpers.PyPlayer(gc.getGame().getActivePlayer()).getUnitByScriptData("FIRST_WORKER").plot()))
+ elif scriptName == "CAMERA_RESET_WORKER":
+
CyCamera().SimpleLookAt(NiPoint3(2292.250488,-529.876099,824.148438),self.centerCameraFocus(PyHelpers.PyPlayer(gc.getGame().getActivePlayer()).getUnitByScriptData("FIRST_WORKER").plot()))
+ elif scriptName == "CAMERA_FOCUS_SECOND_WARRIOR":
+
CyCamera().SimpleLookAt(NiPoint3(1663.343,-35.9953,703.4886),self.centerCameraFocus(PyHelpers.PyPlayer(gc.getGame().getActivePlayer()).getUnitByScriptData("SECOND_WARRIOR").plot()))
+ elif scriptName == "CAMERA_RESET_SECOND_WARRIOR":
+
CyCamera().SimpleLookAt(NiPoint3(2292.250488,-529.876099,824.148438),self.centerCameraFocus(PyHelpers.PyPlayer(gc.getGame().getActivePlayer()).getUnitByScriptData("SECOND_WARRIOR").plot()))
+ elif scriptName == "CAMERA_FOCUS_SECOND_SETTLER":
+
CyCamera().SimpleLookAt(NiPoint3(1663.343,-35.9953,703.4886),self.centerCameraFocus(PyHelpers.PyPlayer(gc.getGame().getActivePlayer()).getUnitByScriptData("SECOND_SETTLER").plot()))
+ elif scriptName == "CAMERA_RESET_SECOND_SETTLER":
+
CyCamera().SimpleLookAt(NiPoint3(2292.250488,-529.876099,824.148438),self.centerCameraFocus(PyHelpers.PyPlayer(gc.getGame().getActivePlayer()).getUnitByScriptData("SECOND_SETTLER").plot()))
+
+
+ #Indicator Scripts
+ elif scriptName == "FIRST_CITY_PLOT_INDICATOR":
+ self.tutorial.setIndicatorPlot ( 33, 14, "COLOR_BLUE" )
+ self.tutorial.showIndicatorPlot ( )
+ self.tutorial.bShowPlotIndicator = True
+ elif scriptName == "COTTAGE_PLOT_INDICATOR":
+ self.tutorial.setIndicatorPlot ( 32, 14, "COLOR_BLUE" )
+ self.tutorial.showIndicatorPlot ( )
+ self.tutorial.bShowPlotIndicator = True
+ elif scriptName == "MINE_PLOT_INDICATOR":
+ self.tutorial.setIndicatorPlot ( 32, 15, "COLOR_BLUE" )
+ self.tutorial.showIndicatorPlot ( )
+ self.tutorial.bShowPlotIndicator = True
+ elif scriptName == "FARM_PLOT_INDICATOR":
+ self.tutorial.setIndicatorPlot ( 32, 13, "COLOR_BLUE" )
+ self.tutorial.showIndicatorPlot ( )
+ self.tutorial.bShowPlotIndicator = True
+ elif scriptName == "QUARRY_PLOT_INDICATOR":
+ self.tutorial.setIndicatorPlot ( 33, 10, "COLOR_BLUE" )
+ self.tutorial.showIndicatorPlot ( )
+ self.tutorial.bShowPlotIndicator = True
+ elif scriptName == "SECOND_CITY_PLOT_INDICATOR":
+ self.tutorial.setIndicatorPlot ( 34, 9, "COLOR_BLUE" )
+ self.tutorial.showIndicatorPlot ( )
+ self.tutorial.bShowPlotIndicator = True
+ elif scriptName == "DISABLE_PLOT_INDICATOR":
+ self.tutorial.bShowPlotIndicator = False
+
+
+ #Screen Changes
+ elif scriptName == "HIGH_ADVISOR_SCREEN":
+ self.setBackgroundPosition(120,48)
+ self.iBackgroundX = 120
+ self.iBackgroundY = 48
+ self.reprocessMessage(self.__iMessageCount)
+ self.tutorial.setHighAdvisorCenter()
+ self.setLeaderheadAdvisor( 0 )
+ self.doHideEndTutorialButton()
+ elif scriptName == "MID_ADVISOR_SCREEN":
+ self.setBackgroundPosition(120,352)
+ self.iBackgroundX = 120
+ self.iBackgroundY = 352
+ self.reprocessMessage(self.__iMessageCount)
+ self.setLeaderheadAdvisor( 0 )
+ self.doHideEndTutorialButton()
+ elif scriptName == "LOW_ADVISOR_SCREEN":
+ self.setBackgroundPosition(120,512)
+ self.iBackgroundX = 120
+ self.iBackgroundY = 512
+ self.reprocessMessage(self.__iMessageCount)
+ self.setLeaderheadAdvisor( 0 )
+ self.doHideEndTutorialButton()
+ elif scriptName == "HIDE_HIGHLIGHT":
+ self.hideItem("TutorialHighlight")
+ elif scriptName == "HIGHLIGHT_GROWTH_PRODUCTION":
+ self.highlightArea (256, 32, xResolution - 512, 128)
+ elif scriptName == "HIGHLIGHT_TREASURY":
+ self.highlightArea (0, 0, 256, 160)
+ elif scriptName == "HIGHLIGHT_CULTURE_BAR":
+ self.highlightArea (0, yResolution - 256, 256, 128)
+ elif scriptName == "HIGHLIGHT_PRODUCTION_QUE":
+ self.highlightArea (0, yResolution - 160, 288, 160)
+ elif scriptName == "HIGHLIGHT_PRODUCTION_LIST":
+ self.highlightArea (256, yResolution - 160, xResolution - 512, 160)
+ elif scriptName == "HIGHLIGHT_RESOURCE_LIST":
+ self.highlightArea (xResolution - 256, 64, 256, yResolution - 512)
+ elif scriptName == "HIGHLIGHT_BUILDING_LIST":
+ self.highlightArea (0, 240, 256, yResolution - 480)
+ elif scriptName == "HIGHLIGHT_SPECIALIST":
+ self.highlightArea (xResolution - 256, yResolution - 480, 256, 288)
+ elif scriptName == "HIGHLIGHT_TILE_MANAGER":
+ self.highlightArea (256, 272, xResolution - 512, yResolution - 400)
+ elif scriptName == "HIGHLIGHT_CITY_GOVERNOR":
+ self.highlightArea (xResolution - 304, yResolution - 144, 96, 144)
+
+ #Rule Scripts
+ elif scriptName == "RULE_START_CULTURE":
+ self.tutorial.bDoCulture = False
+ elif scriptName == "RULE_START_GROWTH":
+ self.tutorial.bDoGrowth = False
+ elif scriptName == "RULE_START_GOLD":
+ self.tutorial.bDoGold = False
+ elif scriptName == "RULE_START_RESEARCH":
+ self.tutorial.bDoResearch = False
+ elif scriptName == "RULE_DISABLE_RESEARCH":
+ self.tutorial.bDoResearch = True
+ elif scriptName == "RULE_START_BARBARIANS":
+ self.tutorial.bCreateBarbarianCities = False
+ self.tutorial.bCreateBarbarianUnits = False
+ elif scriptName == "RULE_START_VICTORY_TEST":
+ self.tutorial.bIsVictoryTest = True
+ elif scriptName == "RULE_ENABLE_UNIT_DELETE":
+ self.tutorial.bCanDeleteUnit = True
+ elif scriptName == "RULE_ENABLE_AUTOMATE_EXPLORE":
+ self.tutorial.bCanUnitAutomateExplore = True
+ elif scriptName == "RULE_ENABLE_INTERFACE_GO_TO_FOR_ALL_UNITS":
+ self.tutorial.bCanUnitsInterfaceModeGoTo = True
+ elif scriptName == "RULE_ENABLE_OPEN_CITY_SCREEN":
+ self.tutorial.bCanOpenCityScreen = True
+ elif scriptName == "RULE_PLAYER_CAN_BUILD_WHAT_THEY_WANT":
+ self.tutorial.bCannotTrain = False
+ self.tutorial.bCannotConstruct = False
+ elif scriptName == "RULE_UNITS_CAN_BE_PROMOTED":
+ self.tutorial.bPromoteAvailable = True
+ elif scriptName == "RULE_ENABLE_TECH_SPLASH_SCREEN":
+ self.tutorial.bShowTechSplash = True
+
+
+ #City Train/Build Scripts
+ elif scriptName == "RULE_CAN_TRAIN_WARRIORS":
+ self.tutorial.bCanTrainWarriors = True
+ elif scriptName == "RULE_CAN_NOT_TRAIN_WARRIORS":
+ self.tutorial.bCanTrainWarriors = False
+ elif scriptName == "RULE_CAN_TRAIN_SCOUTS":
+ self.tutorial.bCanTrainScouts = True
+ elif scriptName == "RULE_CAN_NOT_TRAIN_SCOUTS":
+ self.tutorial.bCanTrainScouts = False
+ elif scriptName == "RULE_CAN_TRAIN_WORKERS":
+ self.tutorial.bCanTrainWorkers = True
+ elif scriptName == "RULE_CAN_NOT_TRAIN_WORKERS":
+ self.tutorial.bCanTrainWorkers = False
+ elif scriptName == "RULE_CAN_TRAIN_SETTLERS":
+ self.tutorial.bCanTrainSettlers = True
+ elif scriptName == "RULE_CAN_NOT_TRAIN_SETTLERS":
+ self.tutorial.bCanTrainSettlers = False
+ elif scriptName == "RULE_CAN_BUILD_OBELISK":
+ self.tutorial.bCanBuildObelisk = True
+ elif scriptName == "RULE_CAN_NOT_BUILD_OBELISK":
+ self.tutorial.bCanBuildObelisk = False
+ elif scriptName == "RULE_CAN_BUILD_BARRACKS":
+ self.tutorial.bCanBuildBarracks = True
+ elif scriptName == "RULE_CAN_NOT_BUILD_BARRACKS":
+ self.tutorial.bCanBuildBarracks = False
+
+ #Actions Allowed
+ elif scriptName == "RULE_CAN_CREATE_FARM":
+ self.tutorial.bCanCreateFarm = True
+ elif scriptName == "RULE_CAN_NOT_CREATE_FARM":
+ self.tutorial.bCanCreateFarm = False
+ elif scriptName == "RULE_CAN_CREATE_COTTAGE":
+ self.tutorial.bCanCreateCottage = True
+ elif scriptName == "RULE_CAN_NOT_CREATE_COTTAGE":
+ self.tutorial.bCanCreateCottage = False
+ elif scriptName == "RULE_CAN_CREATE_MINE":
+ self.tutorial.bCanCreateMine = True
+ elif scriptName == "RULE_CAN_NOT_CREATE_MINE":
+ self.tutorial.bCanCreateMine = False
+ elif scriptName == "RULE_CAN_CREATE_ROADS":
+ self.tutorial.bCanCreateRoads = True
+ elif scriptName == "RULE_CAN_NOT_CREATE_ROADS":
+ self.tutorial.bCanCreateRoads = False
+ elif scriptName == "RULE_ENABLE_PRODUCTION_POPUPS":
+ self.tutorial.bSkipProductionPopup = False
+ elif scriptName == "RULE_DISABLE_PRODUCTION_POPUPS":
+ self.tutorial.bSkipProductionPopup = True
+ elif scriptName == "RULE_ENABLE_END_TURN":
+ self.tutorial.bCanEndTurn = True
+ elif scriptName == "RULE_DISABLE_END_TURN":
+ self.tutorial.bCanEndTurn = False
+ elif scriptName == "RULE_HALT_PRODUCTION":
+ self.tutorial.bDoProduction = True
+ elif scriptName == "RULE_ALLOW_PRODUCTION":
+ self.tutorial.bDoProduction = False
+ elif scriptName == "RULE_ENABLE_RESEARCH_POPUPS":
+ self.tutorial.bSkipResearchPopup = False
+# print ("Trying to open tech Pop up")
+ gc.getPlayer(gc.getGame().getActivePlayer()).chooseTech(0,
CyTranslator().getText("TXT_KEY_CHOOSE_TECH",()), False)
+ elif scriptName == "RULE_DISABLE_RESEARCH_POPUPS":
+ self.tutorial.bSkipResearchPopup = True
+ elif scriptName == "RULE_DISABLE_COLORED_PLOTS":
+ self.tutorial.bUpdateColoredPlots = True
+ elif scriptName == "RULE_ENABLE_COLORED_PLOTS":
+ self.tutorial.bUpdateColoredPlots = False
+ elif scriptName == "RULE_DISABLE_BUILD_ROADS":
+ self.tutorial.bDisableBuildRoads = True
+ elif scriptName == "RULE_ENABLE_BUILD_ROADS":
+ self.tutorial.bDisableBuildRoads = False
+
+ #Research Tech
+ elif scriptName == "WAIT_FOR_ARCHERY_SELECTION":
+ self.tutorial.bWaitForResearchSelection = True
+ self.tutorial.bCannotResearch = False
+ self.tutorial.iCannotResearch = CvUtil.findInfoTypeNum(gc.getTechInfo,
gc.getNumTechInfos(), "TECH_ARCHERY")
+ self.tutorial.iGetFirstRecommendedTech =
CvUtil.findInfoTypeNum(gc.getTechInfo, gc.getNumTechInfos(), "TECH_ARCHERY")
+ elif scriptName == "WAIT_FOR_ARCHERY_DISCOVERED":
+ self.tutorial.bWaitForResearchDiscovered = True
+ elif scriptName == "WAIT_FOR_MASONRY_SELECTION":
+ self.tutorial.bWaitForResearchSelection = True
+ self.tutorial.bCannotResearch = False
+ self.tutorial.iCannotResearch = CvUtil.findInfoTypeNum(gc.getTechInfo,
gc.getNumTechInfos(), "TECH_MASONRY")
+ self.tutorial.iGetFirstRecommendedTech =
CvUtil.findInfoTypeNum(gc.getTechInfo, gc.getNumTechInfos(), "TECH_MASONRY")
+ elif scriptName == "WAIT_FOR_MASONRY_DISCOVERED":
+ self.tutorial.bWaitForResearchDiscovered = True
+ elif scriptName == "WAIT_FOR_MEDITATION_SELECTION":
+ self.tutorial.bWaitForResearchSelection = True
+ self.tutorial.bCannotResearch = False
+ self.tutorial.iCannotResearch = CvUtil.findInfoTypeNum(gc.getTechInfo,
gc.getNumTechInfos(), "TECH_MEDITATION")
+ self.tutorial.iGetFirstRecommendedTech =
CvUtil.findInfoTypeNum(gc.getTechInfo,
gc.getNumTechInfos(), "TECH_MEDITATION")
+ elif scriptName == "WAIT_FOR_MEDITATION_DISCOVERED":
+ self.tutorial.bWaitForResearchDiscovered = True
+ elif scriptName == "WAIT_FOR_BRONZE_WORKING_SELECTION":
+ self.tutorial.bWaitForResearchSelection = True
+ self.tutorial.bCannotResearch = False
+ self.tutorial.iCannotResearch = CvUtil.findInfoTypeNum(gc.getTechInfo,
gc.getNumTechInfos(), "TECH_BRONZE_WORKING")
+ self.tutorial.iGetFirstRecommendedTech =
CvUtil.findInfoTypeNum(gc.getTechInfo,
gc.getNumTechInfos(), "TECH_BRONZE_WORKING")
+ elif scriptName == "WAIT_FOR_BRONZE_WORKING_DISCOVERED":
+ self.tutorial.bWaitForResearchDiscovered = True
+ elif scriptName == "RULE_CLEAR_RESEARCH_RESTRICTION":
+ self.tutorial.bCannotResearch = False
+ self.tutorial.iCannotResearch = 0
+ self.tutorial.iGetFirstRecommendedTech = TechTypes.NO_TECH
+
+ #Change Advisors
+# elif scriptName == "SET_ADVISOR_GROWTH":
+
+
+ #Wait for actions
+ elif scriptName == "WAIT_FOR_SELECT_SETTLER":
+ self.bWaitToContinue = True
+ self.tutorial.doWaitForSelected("FIRST_SETTLER")
+ elif scriptName == "WAIT_FOR_RECENTER":
+ self.bWaitForRecenterToContinue = True
+ elif scriptName == "WAIT_FOR_BUILD_FIRST_CITY":
+ self.tutorial.setWaitForAction( MissionTypes.MISSION_FOUND,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_SETTLER", [[1,1]])
+ self.tutorial.bWaitForUnitAction = True
+ CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT,
True)
+ elif scriptName == "WAIT_FOR_BEGIN_PLAYER_TURN":
+ self.tutorial.bWaitForBeginPlayerTurn = True
+ elif scriptName == "WAIT_FOR_WARRIOR_TO_FORTIFY":
+ self.tutorial.setWaitForAction( MissionTypes.MISSION_FORTIFY,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WARRIOR", [[1,1]])
+ self.tutorial.bWaitForUnitFortify = True
+ CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT,
True)
+ elif scriptName == "WAIT_FOR_SCOUT_MOVE_TO_VILLAGE_1":
+ self.tutorial.setWaitForAction( MissionTypes.NO_MISSION,
InterfaceModeTypes.INTERFACEMODE_GO_TO, CommandTypes.NO_COMMAND,
scriptName, "FIRST_SCOUT", [[28,17]])
+ self.tutorial.bWaitForGoToAction = True
+ CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT,
True)
+ elif scriptName == "WAIT_UNTIL_TRIBAL_VILLAGE_EXPLORED":
+ self.tutorial.bWaitForVillageDiscovered = True
+ elif scriptName == "WAIT_FOR_SCOUT_MOVE_TO_VILLAGE_2":
+ self.tutorial.setWaitForAction( MissionTypes.NO_MISSION,
InterfaceModeTypes.INTERFACEMODE_GO_TO, CommandTypes.NO_COMMAND,
scriptName, "FIRST_SCOUT", [[25,18]])
+ self.tutorial.bWaitForGoToAction = True
+ CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT,
True)
+ elif scriptName == "WAIT_FOR_OPEN_CITY_SCREEN":
+ self.tutorial.bWaitForOpenCityScreen = True
+ elif scriptName == "WAIT_FOR_ESCAPE_FROM_CITY_SCREEN":
+ self.tutorial.bWaitForEscapeCityScreen = True
+ elif scriptName == "WAIT_FOR_BUILD_SECOND_CITY":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_FOUND,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "SECOND_SETTLER", [[1,1]])
+ self.tutorial.bWaitForUnitAction = True
+ CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT,
True)
+
+
+
+ #Free up setWaitForAction
+ elif scriptName == "FREE_UNIT_CONTROL":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "NONE", tuple())
+ self.tutorial.iForcedBuildImprovement = -1
+ elif scriptName == "FREE_BUILD_RECOMMENDATION":
+
self.tutorial.FirstCity.chooseProduction(UnitTypes.NO_UNIT,BuildingTypes.NO_BUILDING,ProjectTypes.NO_PROJECT,True,False)
+ self.tutorial.iGetRecommendedUnit = UnitTypes.NO_UNIT
+ self.tutorial.iGetRecommendedBuilding = BuildingTypes.NO_BUILDING
+
+
+ #Freeze Units FREEZE_WARRIOR
+ elif scriptName == "RESTRICT_SETTLER_MOVEMENT":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_SETTLER", [[1,1]])
+ elif scriptName == "RESTRICT_WORKER_MOVEMENT":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WORKER", [[1,1]])
+ elif scriptName == "FREEZE_SCOUT":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_SCOUT", [[1,1]])
+ elif scriptName == "FREEZE_WARRIOR":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WARRIOR", [[1,1]])
+ elif scriptName == "FREEZE_SECOND_WARRIOR":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "SECOND_WARRIOR", [[1,1]])
+ elif scriptName == "FREEZE_SECOND_SETTLER":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "SECOND_SETTLER", [[1,1]])
+
+ # Can open screen controls
+ elif scriptName == "RULE_ENABLE_RELIGION_SCREEN":
+ self.tutorial.bCanOpenReligionScreen = True
+ elif scriptName == "RULE_ENABLE_CIVIC_SCREEN":
+ self.tutorial.bCanOpenCivicScreen = True
+ elif scriptName == "RULE_ENABLE_DIPLOMACY_SCREEN":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_SETTLER", [[33,14]])
+ self.tutorial.bCanOpenDiplomacyScreen = True
+ elif scriptName == "RULE_ENABLE_ALL_OTHER_SCREENS":
+ self.tutorial.bCanOpenAllOtherScreens = True
+
+
+ #Wait for Moves
+ elif scriptName == "WAIT_FOR_SETTLER_1_MOVE":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_SETTLER", [[33,14]])
+ self.tutorial.bWaitForUnitAction = True
+ elif scriptName == "WAIT_FOR_WARRIOR_MOVE_TO_LION":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WARRIOR", [[34,13],[34,14]])
+ self.tutorial.bWaitForUnitAction = True
+ CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT,
True)
+ elif scriptName == "WAIT_FOR_WARRIOR_RETURN_FROM_LION":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WARRIOR", [[34,13],[34,14], [33,14]])
+ self.tutorial.bWaitForReturnFirstCity = True
+ CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT,
True)
+ elif scriptName == "WAIT_FOR_WARRIOR_TO_ATTACK_LION":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WARRIOR", [[35,13]])
+ self.tutorial.bWaitForUnitCombat = True
+ elif scriptName == "WAIT_FOR_WARRIOR_MOVE_TO_CITY":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WARRIOR", [[33,14]])
+ self.tutorial.bWaitForUnitAction = True
+ elif scriptName == "WAIT_FOR_WORKER_MOVE_TO_FARM":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WORKER", [[32,13]])
+ self.tutorial.bWaitForUnitAction = True
+ elif scriptName == "WAIT_FOR_WORKER_MOVE_TO_COTTAGE":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WORKER", [[32,14]])
+ self.tutorial.bWaitForUnitAction = True
+ elif scriptName == "WAIT_FOR_WORKER_MOVE_TO_MINE":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WORKER", [[32,15]])
+ self.tutorial.bWaitForUnitAction = True
+ elif scriptName == "WAIT_FOR_SETTLER_MOVE_TO_SECOND_CITY":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_MOVE_TO,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "SECOND_SETTLER",
[[33,13],[34,13],[33,12],[34,12],[33,11],[34,11],[33,10],[34,10],[34,9]])
+ self.tutorial.bWaitForMoveToSecondCity = True
+ elif scriptName == "WAIT_FOR_WORKER_MOVE_TO_STONE":
+ self.tutorial.bWaitForWorkerArriveStone = True
+ elif scriptName == "WAIT_FOR_WORKER_ROUTE_TO_STONE":
+ self.tutorial.setWaitForAction( MissionTypes.NO_MISSION,
InterfaceModeTypes.INTERFACEMODE_ROUTE_TO, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WORKER", [[33,14]])
+ self.tutorial.bWaitForRouteToAction = True
+
+
+ #Wait for worker builds
+ elif scriptName == "WAIT_FOR_WORKER_BUILD_FARM":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_BUILD,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WORKER", [[1,1]])
+ self.tutorial.setBuildImprovement("BUILD_FARM")
+ self.tutorial.bWaitForWorkerToBuild = True
+ CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT,
True)
+ elif scriptName == "WAIT_FOR_WORKER_BUILD_COTTAGE":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_BUILD,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WORKER", [[1,1]])
+ self.tutorial.setBuildImprovement("BUILD_COTTAGE")
+ self.tutorial.bWaitForWorkerToBuild = True
+ CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT,
True)
+ elif scriptName == "WAIT_FOR_WORKER_BUILD_MINE":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_BUILD,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WORKER", [[1,1]])
+ self.tutorial.bWaitForWorkerToBuild = True
+ CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT,
True)
+ self.tutorial.setBuildImprovement("BUILD_MINE")
+ elif scriptName == "WAIT_FOR_WORKER_BUILD_QUARRY":
+ self.tutorial.setWaitForAction(MissionTypes.MISSION_BUILD,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.NO_COMMAND,
scriptName, "FIRST_WORKER", [[1,1]])
+ self.tutorial.bWaitForWorkerToBuild = True
+ CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT,
True)
+ self.tutorial.setBuildImprovement("BUILD_QUARRY")
+ elif scriptName == "WAIT_FOR_ROAD_TO_FINISH":
+ self.tutorial.bWaitForWorkerToBuildRoad = True
+
+ #Wait for finish building
+ elif scriptName == "WAIT_FOR_WORKER_FINISH_IN_ROME":
+ self.tutorial.bWaitForWorkerToFinishBuilding = True
+ elif scriptName == "WAIT_FOR_BARRACKS_TO_BUILD":
+ self.tutorial.bWaitForBarracksToBuild = True
+ elif scriptName == "WAIT_FOR_WARRIOR_FINISH_IN_ROME":
+ self.tutorial.bWaitForWarriorToFinishBuilding = True
+ elif scriptName == "WAIT_FOR_SETTLER_FINISH_IN_ROME":
+ self.tutorial.bWaitForSettlerToFinishBuilding = True
+
+
+ #Wait for Selections
+ elif scriptName == "WAIT_FOR_BUILD_SELECTION_WARRIOR":
+ self.tutorial.FirstCity.chooseProduction(
UnitTypes.NO_UNIT,BuildingTypes.NO_BUILDING,ProjectTypes.NO_PROJECT,True,False)
+ self.tutorial.iGetRecommendedUnit = iWarrior
+ self.tutorial.iGetRecommendedBuilding = BuildingTypes.NO_BUILDING
+ self.tutorial.iForcedUnit = iWarrior
+ self.tutorial.iForcedBuilding = -1
+ self.tutorial.bWaitForBuildSelectionWarrior = True
+ elif scriptName == "WAIT_FOR_BUILD_SELECTION_SCOUT":
+
self.tutorial.FirstCity.chooseProduction(UnitTypes.NO_UNIT,BuildingTypes.NO_BUILDING,ProjectTypes.NO_PROJECT,True,False)
+ self.tutorial.iGetRecommendedUnit = iScout
+ self.tutorial.iGetRecommendedBuilding = BuildingTypes.NO_BUILDING
+ self.tutorial.iForcedUnit = iScout
+ self.tutorial.iForcedBuilding = -1
+ self.tutorial.bWaitForBuildSelectionScout = True
+ elif scriptName == "WAIT_FOR_BUILD_SELECTION_OBELISK":
+
self.tutorial.FirstCity.chooseProduction(UnitTypes.NO_UNIT,BuildingTypes.NO_BUILDING,ProjectTypes.NO_PROJECT,True,False)
+ self.tutorial.iGetRecommendedUnit = UnitTypes.NO_UNIT
+ self.tutorial.iGetRecommendedBuilding = iObelisk
+ self.tutorial.iForcedUnit = -1
+ self.tutorial.iForcedBuilding = iObelisk
+ self.tutorial.bWaitForBuildSelectionObelisk = True
+ elif scriptName == "WAIT_FOR_BUILD_SELECTION_WORKER":
+
self.tutorial.FirstCity.chooseProduction(UnitTypes.NO_UNIT,BuildingTypes.NO_BUILDING,ProjectTypes.NO_PROJECT,True,False)
+ self.tutorial.iGetRecommendedUnit = iWorker
+ self.tutorial.iGetRecommendedBuilding = BuildingTypes.NO_BUILDING
+ self.tutorial.iForcedUnit = iWorker
+ self.tutorial.iForcedBuilding = -1
+ self.tutorial.bWaitForBuildSelectionWorker = True
+ elif scriptName == "WAIT_FOR_BUILD_SELECTION_BARRACKS":
+
self.tutorial.FirstCity.chooseProduction(UnitTypes.NO_UNIT,BuildingTypes.NO_BUILDING,ProjectTypes.NO_PROJECT,True,False)
+ self.tutorial.iGetRecommendedUnit = UnitTypes.NO_UNIT
+ self.tutorial.iGetRecommendedBuilding = iBarracks
+ self.tutorial.iForcedUnit = -1
+ self.tutorial.iForcedBuilding = iBarracks
+ self.tutorial.bWaitForBuildSelectionBarracks = True
+ elif scriptName == "WAIT_FOR_BUILD_SELECTION_SETTLER":
+
self.tutorial.FirstCity.chooseProduction(UnitTypes.NO_UNIT,BuildingTypes.NO_BUILDING,ProjectTypes.NO_PROJECT,True,False)
+ self.tutorial.iGetRecommendedBuilding = BuildingTypes.NO_BUILDING
+ self.tutorial.iGetRecommendedUnit = iSettler
+ self.tutorial.iForcedUnit = iSettler
+ self.tutorial.iForcedBuilding = -1
+ self.tutorial.bWaitForBuildSelectionSettler = True
+ elif scriptName == "WAIT_FOR_STONEHENGE_SELECTION":
+ self.tutorial.bStoneHengeAllowed = True
+
self.tutorial.FirstCity.chooseProduction(UnitTypes.NO_UNIT,BuildingTypes.NO_BUILDING,ProjectTypes.NO_PROJECT,True,False)
+ self.tutorial.iGetRecommendedUnit = UnitTypes.NO_UNIT
+ self.tutorial.iGetRecommendedBuilding = iStonehenge
+ self.tutorial.iForcedUnit = -1
+ self.tutorial.iForcedBuilding = iStonehenge
+ self.tutorial.bWaitForBuildSelectionStonehenge = True
+
+
+ elif scriptName == "WAIT_FOR_PROMOTION_SELECTION":
+ self.tutorial.setWaitForAction( MissionTypes.NO_MISSION,
InterfaceModeTypes.NO_INTERFACEMODE, CommandTypes.COMMAND_PROMOTION,
scriptName, "SECOND_WARRIOR", [[]])
+ self.tutorial.bWaitForUnitAction = True
+ self.tutorial.bWaitForPromotion = True
+ CyInterface().setDirty(InterfaceDirtyBits.SelectionButtons_DIRTY_BIT,
True)
+
+
+ #Events
+ elif scriptName == "ENABLE_INCREASED_PRODUCTION_IN_ROME":
+ self.tutorial.bIncreasedProductionRome = True
+ elif scriptName == "DISABLE_INCREASED_PRODUCTION_IN_ROME":
+ self.tutorial.bIncreasedProductionRome = False
+ elif scriptName == "INCREASE_ROMES_PRODUCTION":
+ self.tutorial.FirstCity.changeProduction(11)
+ elif scriptName == "INCREASE_ROMES_PRODUCTION_ALOT":
+ self.tutorial.FirstCity.changeProduction(30)
+ elif scriptName == "SPAWN_MARAUDING_LIONS":
+
gc.getPlayer(gc.getBARBARIAN_PLAYER()).initUnit(CvUtil.findInfoTypeNum(gc.getUnitInfo,
gc.getNumUnitInfos(),"UNIT_LION"), 35, 11, UnitAITypes.NO_UNITAI)
+ self.tutorial.FirstLion =
gc.getPlayer(gc.getBARBARIAN_PLAYER()).getUnit(0)
+ elif scriptName == "SPAWN_TRIBAL_VILLAGES":
+
CyMap().plot(28,17).setImprovementType(CvUtil.findInfoTypeNum(gc.getImprovementInfo,
gc.getNumImprovementInfos(), "IMPROVEMENT_GOODY_HUT"))
+
CyMap().plot(25,18).setImprovementType(CvUtil.findInfoTypeNum(gc.getImprovementInfo,
gc.getNumImprovementInfos(), "IMPROVEMENT_GOODY_HUT"))
+ elif scriptName == "REVEAL_FIRST_TRIBAL_VILLAGE":
+
CyMap().plot(28,17).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(29,16).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(29,17).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(29,18).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(28,16).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(28,18).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(27,16).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(27,17).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(27,18).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(29,15).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+ elif scriptName == "REVEAL_SECOND_CITY":
+
CyMap().plot(34,9).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(35,9).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(33,9).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(34,10).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(35,10).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(33,10).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(34,8).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(35,8).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(33,8).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+ elif scriptName == "WAIT_FOR_FIRST_CONTACT":
+ self.tutorial.bWaitForFirstContact = True
+ elif scriptName == "SPAWN_INDIA":
+ self.tutorial.bGoWestNotAllowed = False
+ gc.getPlayer(1).initUnit(CvUtil.findInfoTypeNum(gc.getUnitInfo,
gc.getNumUnitInfos(),"UNIT_SETTLER"), 11, 9, UnitAITypes.NO_UNITAI)
+ gc.getPlayer(1).initUnit(CvUtil.findInfoTypeNum(gc.getUnitInfo,
gc.getNumUnitInfos(),"UNIT_SPEARMAN"), 11, 9, UnitAITypes.NO_UNITAI)
+ gc.getPlayer(1).initUnit(CvUtil.findInfoTypeNum(gc.getUnitInfo,
gc.getNumUnitInfos(),"UNIT_SCOUT"), 11, 9, UnitAITypes.NO_UNITAI)
+
+
+ #AI controls
+ elif scriptName == "ENABLE_FORCE_LIONS_MOVE_NORTH":
+ self.tutorial.bForceLionMoveNorth = True
+
+ elif scriptName == "DISABLE_FORCE_LIONS_MOVE_NORTH":
+ self.tutorial.bForceLionMoveNorth = False
+
+# elif scriptName == "MARAUDING_LIONS_GROWL":
+ #Need force Lion Growl
+
+ elif scriptName == "RULE_PAUSE_POPUPS":
+ CyInterface().setPausedPopups ( True )
+
+ elif scriptName == "RULE_UNPAUSE_POPUPS":
+ CyInterface().setPausedPopups ( False )
+
+ elif scriptName == "TUTORIAL_START":
+ self.tutorial.bTutorialBegun = True
+
+ elif scriptName == "TUTORIAL_COMPLETE":
+ self.tutorial.bTutorialComplete = True
+ CyCamera().SetViewPortCenter(NiPoint2(0.5, 0.4))
+
+ elif scriptName == "SELECT_OBJECTIVE_UNIT":
+ CyInterface().selectUnit( PyHelpers.PyPlayer(
gc.getGame().getActivePlayer() ).getUnitByScriptData(
self.tutorial.szScriptData ), 0, 0, 0 )
+
+ elif scriptName == "DISABLE_KEYBOARD_INPUT":
+ self.tutorial.bConsumeKeyboardInput = True
+ elif scriptName == "ENABLE_KEYBOARD_INPUT":
+ self.tutorial.bConsumeKeyboardInput = False
+
+ elif scriptName == "DISABLE_MOUSE_INPUT_TO_MAIN_INTERFACE":
+ self.tutorial.bDisableMainInteraceMouseInput = True
+ elif scriptName == "ENABLE_MOUSE_INPUT_TO_MAIN_INTERFACE":
+ self.tutorial.bDisableMainInteraceMouseInput = False
+
+ elif scriptName == "ENABLE_WORKER_BUILD_QUARRY":
+ self.tutorial.bWorkerCanBuildQuarry = True
+
+ elif scriptName == "ENABLE_SHOW_TECH_CHOOSER_BUTTON":
+ self.tutorial.bShowTechChooserButton = False
+
+ elif scriptName == "ENABLE_WATCH_CITY_SCREEN":
+ self.tutorial.bWatchCityScreen = True
+
+ elif scriptName == "ENABLE_LOCK_FIRST_WARRIOR":
+ self.tutorial.bLockFirstWarrior = True
+
+ elif scriptName == "DISABLE_LOCK_FIRST_WARRIOR":
+ self.tutorial.bLockFirstWarrior = False
+
+ ###################
+
+ return
+
+ def processTutorialMessage(self, iTutorialMessage):
+ if self.activeTutorialInfo:
+ self.activeTutorialMessage =
self.activeTutorialInfo.getTutorialMessage(iTutorialMessage)
+ self.tutorial.setActiveTutorialMessage(self.activeTutorialMessage)
+ #self.setText(TEXT_AREA_DEBUG,"TutorialInfo: %s - Message
(%s)" %(self.activeTutorialInfo.getType(),self.__iMessageCount))
+ # Text
+ self.setText(TEXT_AREA_ADVISOR,self.activeTutorialMessage.getText())
+ # Sound
+ self.playAdvisorSound(self.activeTutorialMessage.getSound())
+ # Image - set to "No Text" when XML is loading
+ messageImage = self.activeTutorialMessage.getImage()
+ if messageImage != "No Text":
+ # remove the message
+ if messageImage == "CLEAR":
+ self.clearHelpImage()
+ else:
+ self.setHelpImage(messageImage)
+ # Scripts
+ if self.activeTutorialMessage.getNumTutorialScripts() > 0:
+ self.processTutorialScripts()
+ else:
+ self.setText(TEXT_AREA_DEBUG,"TutorialInfo: INVALID")
+
+ def reprocessMessage(self,iTutorialMessage):
+ self.activeTutorialMessage =
self.activeTutorialInfo.getTutorialMessage(iTutorialMessage)
+ self.tutorial.setActiveTutorialMessage(self.activeTutorialMessage)
+ self.setText(TEXT_AREA_ADVISOR,self.activeTutorialMessage.getText())
+
+ def processTutorialInfo(self, tutorialInfoID):
+ CvUtil.pyPrint("processTutorialInfo -> %s" %tutorialInfoID)
+ self.activeTutorialInfo = gc.getTutorialInfo(tutorialInfoID)
+ self.__doBeginTutorialInfo()
+ self.processTutorialMessage(0)
+ def processTutorialInfoByType(self, name):
+ self.processTutorialInfo(gc.getInfoTypeForString(name))
+ def handleInput(self, inputClass):
+ if self.activeTutorialInfo:
+ if (inputClass.getNotifyCode() == NotifyCode.NOTIFY_CLICKED):
+ functionName = inputClass.getFunctionName()
+ if functionName == "Reset":
+ CvUtil.pyPrint("Reset Message being handled")
+ self.resetTutorialScreen()
+ return 1
+
+ elif functionName == "Continue":
+ if self.bWaitToContinue:
+ CvUtil.pyPrint("bWaitToContinue is TRUE: Returning")
+ return 0
+ if self.__iMessageCount+1 ==
self.activeTutorialInfo.getNumTutorialMessages():
+ CvUtil.pyPrint("All Messages Presented, calling doEndTutorialInfo
(%s)" %self.activeTutorialInfo.getType())
+ self.__doEndTutorialInfo()
+ return 0
+ else:
+ CvUtil.pyPrint("Continue Message (%s) do Next Message
(%s)" %(self.activeTutorialInfo.getType(), self.__iMessageCount+1))
+ self.__iMessageCount += 1
+ self.processTutorialMessage(self.__iMessageCount)
+ return 1
+
+ elif functionName == "Previous":
+ CvUtil.pyPrint("Previous Message being handled - iCurrentMessageID
= %s" %self.__iMessageCount)
+ if self.__iMessageCount == 0:
+ return
+ self.__iMessageCount -= 1
+ self.processTutorialMessage(self.__iMessageCount)
+ elif functionName == "End Tutorial":
+ self.clearScreen()
+ else:
+ return 0
+
+ return 1
+ return 0
+ def processTutorialScripts(self):
+ l_Scripts = self.getScriptList()
+ if l_Scripts:
+ for script in l_Scripts:
+ CvUtil.pyPrint("tutorialAdvisor.processTutorialScripts -->
Processing %s" %script)
+ self.doScript(script)
+ return
+ def getScriptList(self):
+ numScripts = self.getActiveTutorialMessage().getNumTutorialScripts()
+ if numScripts <= 0 or numScripts > 100:
+ return
+ l_ScriptNames = []
+ for i in range(self.getActiveTutorialMessage().getNumTutorialScripts()):
+
l_ScriptNames.append(self.getActiveTutorialMessage().getTutorialScriptByIndex(i))
+ return l_ScriptNames
+ def setText(self, iTextArea, messageText, argsList=()):
+ textAreas = { TEXT_AREA_ADVISOR : self.setAdvisorText,
+ TEXT_AREA_DEBUG : self.setDebugText,
+ }
+ # if the message text is a game text key use it, otherwise display the
string
+ if messageText.find("TUTORIAL") != -1:
+ messageText=CyTranslator().getText(messageText,argsList)
+ if textAreas.has_key(iTextArea):
+ return textAreas[iTextArea](messageText)
+
+ def centerCameraFocus(self, plot):
+ x = plot.getX()
+ y = plot.getY()
+ return CyMap().plot(x,y).getPoint()
+ def centerCameraFocusOnPlot(self, plot):
+ x = plot.getX()
+ y = plot.getY()
+ return CyMap().plot(x,y+1).getPoint()
+ def resetTutorial(self):
+ self.clearScreen()
+ self.resetActiveTutorialInfo()
+ self.startTutorial(True)
+ def resetActiveTutorialInfo(self):
+ self.activeTutorialInfo = None
+ self.activeTutorialMessage = None
+ def getActiveTutorialMessage(self):
+ if self.activeTutorialMessage:
+ return self.activeTutorialMessage
+ def getActiveTutorialInfo(self):
+ if self.activeTutorialInfo:
+ return self.activeTutorialInfo
+
+ def getCompletedTutorialInfos(self):
+ print (self.activeTutorialInfo.getType(), self.__l_TutorialInfos)
+ return (self.activeTutorialInfo.getType(), self.__l_TutorialInfos)
+ def setCompletedTutorialInfos(self, list):
+ print list
+ self.__l_TutorialInfos = list[1]
+
+ def doTutorialInfoComplete(self, type):
+ self.__iMessageCount = 0
+ self.__iCompletedTutorialInfos += 1
+ self.__l_TutorialInfos.append(type)
+
+ def doHideEndTutorialButton(self):
+ self.clearAdvisorButtons()
+ self.showAdvisorButtons('Continue')
+
+ def doHideOKButton(self):
+ self.clearAdvisorButtons()
+# self.showAdvisorButtons('Previous')
+
+
+ def doShowAllButtons(self):
+ self.clearAdvisorButtons()
+ self.showAdvisorButtons('Continue')
+# self.showAdvisorButtons('Previous')
+
+
+ def doShowEndTutorialButtons(self):
+ self.clearAdvisorButtons()
+ self.showAdvisorButtons('End Tutorial')
+
+ def doScreenRefresh( self ):
+ self.setBackgroundPosition(self.iBackgroundX ,self.iBackgroundY)
+ self.reprocessMessage(self.__iMessageCount)
+ self.doHideEndTutorialButton()
+
+ def show( self, szName ):
+ screen = self.getScreen()
+ screen.show(szName)
+
+ def getNextWidgetName(self):
+ szName = self.WIDGET_ID + str(self.nWidgetCount)
+ self.nWidgetCount += 1
+ return szName
+
+ def setCloseOnEscape(self, bClose):
+ screen = self.getScreen()
+ screen.setCloseOnEscape(bClose)
+
+tutorialAdvisorScreen = CvTutorialAdvisorScreen()
=======================================
--- /dev/null
+++ /trunk/The History of Three Kingdoms/Assets/Python/Tutorial.py Tue Sep
29 23:51:43 2009
@@ -0,0 +1,290 @@
+import CvUtil
+import PyHelpers
+import Popup as PyPopup
+from CvPythonExtensions import *
+
+PyPlayer = PyHelpers.PyPlayer
+gc = CyGlobalContext()
+
+class CvTutorial:
+ def __init__(self):
+ print "Re-Init the tutorial?? WTF?!"
+ self.resetTutorial()
+
+ def resetTutorial(self):
+ print "In Reset Tutorial"
+
+ self.szActiveTutorialInfoType = None
+ self.activeTutorialMessage = None
+ self.szScriptName = None
+ self.szScriptData = None
+
+ self.bCanOpenAllOtherScreens = False
+ self.bCanOpenDiplomacyScreen = False
+ self.bCanOpenCivicScreen = False
+ self.bCanOpenReligionScreen = False
+
+ self.bHideContinueButton = False
+
+ self.bDisableMainInteraceMouseInput = False
+
+ self.bWorkerCanBuildQuarry = False
+
+ self.bWaitForReturnFirstCity = False
+
+ self.bForceAction = False
+ self.iForceActionMissionType = -1
+ self.iForceActionInterfaceModeTypes = -1
+ self.iForceActionCommandTypes = -1
+ self.ValidPlots = tuple()
+
+ self.bTutorialBegun = False
+
+ self.bConsumeKeyboardInput = False
+
+ self.bShowPlotIndicator = False
+ self.iIndicatorPlotX = 0
+ self.iIndicatorPlotY = 0
+ self.szIndicatorColor = "COLOR_BLUE"
+
+ self.bCanEndTurn = False
+
+ self.bDisableBuildRoads = True
+
+ self.bTutorialComplete = False
+
+ self.FirstCityPlot = (33,14)
+ self.FirstCity = -1
+
+ self.iForcedBuildImprovement = -1
+
+ self.SecondCityPlot = (34,9)
+ self.SecondCity = -2
+
+ self.bPromoteAvailable = False
+ self.bStoneHengeAllowed = False
+ self.bGoWestNotAllowed = True
+
+ self.bWaitForSelectedUnit = False
+ self.SelectedUnit = -1
+
+ self.bWaitForUnitAction = False
+ self.UnitToDoAction = -1
+
+ self.bWaitForWorkerArriveStone = False
+ self.bCanOpenCityScreen = False
+
+ self.bWaitForBeginPlayerTurn = False
+
+ self.bForceLionMoveNorth = True
+ self.FirstLion = -1
+
+ self.bIncreasedProductionRome = False
+
+ self.bWaitForGoToAction = False
+ self.bWaitForRouteToAction = False
+
+ self.bCannotMouseMapInput =False
+
+ self.bShowTechSplash=False
+ self.bWatchCityScreen = False
+
+ self.bWaitForUnitFortify = False
+ self.bWaitForWorkerToBuild = False
+ self.bWaitForBarracksToBuild = False
+ self.bWaitForWorkerToBuildRoad = False
+ self.bWaitForUnitCombat = False
+ self.bShowTechChooserButton = False
+ self.bLockFirstWarrior = False
+
+ self.bWaitForBuildSelectionWarrior = False
+ self.bWaitForBuildSelectionScout = False
+ self.bWaitForBuildSelectionObelisk = False
+ self.bWaitForBuildSelectionWorker = False
+ self.bWaitForBuildSelectionBarracks = False
+ self.bWaitForBuildSelectionSettler = False
+ self.bWaitForBuildSelectionStonehenge = False
+
+ self.bWaitForVillageDiscovered = False
+ self.iGoodiesReceived = 0
+ self.bWaitForOpenCityScreen = False
+
+ self.bCanUnitAutomateExplore = False
+
+ self.bWaitForEscapeCityScreen = False
+
+ self.bWaitForWorkerToFinishBuilding = False
+ self.bWaitForWarriorToFinishBuilding = False
+ self.bWaitForSettlerToFinishBuilding = False
+
+ self.bWaitForPromotion = False
+
+ self.bWaitForMoveToSecondCity = False
+
+ self.bWaitForResearchSelection = False
+ self.bWaitForResearchDiscovered = False
+
+ self.bWaitForFirstContact = False
+
+ self.bCanDeleteUnit = False
+ self.bCanUnitsInterfaceModeGoTo = False
+
+ self.iFirstSettler = 0
+ self.iFirstWarrior = 1
+ self.iSecondWarrior = 2
+ self.iFirstScout = 3
+ self.iFirstWorker = 4
+ self.iThirdWarrior = 5
+ self.iSecondSettler = 6
+
+ self.bLockCamera = False
+ self.bNoCityScreen = False
+ self.bCameraScriptOn = False
+
+ self.iForcedUnit = -1
+ self.iForcedBuilding = -1
+
+ self.iGetRecommendedUnit = UnitTypes.NO_UNIT
+ self.iGetRecommendedBuilding = BuildingTypes.NO_BUILDING
+ self.iGetFirstRecommendedTech = TechTypes.NO_TECH
+ self.iGetSecondRecommendedTech = TechTypes.NO_TECH
+ self.iAI_chooseTech = TechTypes.NO_TECH
+
+
+ self.bIsVictoryTest = False
+ self.bIsPlayerResearch = True
+ self.bCreateBarbarianCities = True
+ self.bCreateBarbarianUnits = True
+ self.bSkipResearchPopup = True
+ self.bSkipProductionPopup = True
+ self.bUpdateColoredPlots = True
+ self.bIsActionRecommended = False
+ self.bCannotHandleAction = False
+ self.bCannotSelectionListMove = False
+ self.bCanResearch = False
+ self.iCanResearch = 0
+ self.bCannotResearch = False
+ self.iCannotResearch = TechTypes.NO_TECH
+ self.bCanDoCivic = False
+ self.bCannotDoCivic = False
+ self.bCanTrain = False
+ self.bCannotTrain = True
+ self.bCanConstruct = False
+ self.bCannotConstruct = True
+ self.bCanCreate = False
+ self.bCannotCreate = False
+ self.bCanMaintain = False
+ self.bCannotMaintain = False
+ self.bAI_chooseProduction = False
+ self.bAI_unitUpdate = False
+ self.bCalculateScore = False
+ self.bDoGold = True
+ self.bDoResearch = True
+ self.bDoGoody = False
+ self.bDoGrowth = True
+ self.bDoProduction = False
+ self.bDoCulture = True
+ self.bDoPlotCulture = False
+ self.bDoReligion = False
+ self.bDoGreatPeople = False
+ self.bDoMeltdown = False
+ #Ed Added
+ self.bCanTrainWarriors = True
+ self.bCanTrainScouts = False
+ self.bCanTrainWorkers = False
+ self.bCanTrainSettlers = False
+ self.bCanBuildObelisk = False
+ self.bCanBuildBarracks = False
+ self.bCanCreateFarm = True
+ self.bCanCreateCottage = False
+ self.bCanCreateMine = False
+ self.bCanCreateRoads = False
+
+ def doTUTORIAL_INTRODUCTION(self):
+ self.bUpdateColoredPlots = True
+ self.bIsPlayerResearch = False
+ self.bSkipResearchPopup = True
+ self.bSkipProductionPopup = True
+ self.bCannotSelectionListMove = True
+ self.bCreateBarbarianUnits = True
+
+ def setActiveTutorialMessage(self, activeTutorialMessage):
+ self.activeTutorialMessage = activeTutorialMessage
+
+ def doWaitForSelected(self, unitDataString):
+ CvUtil.pyPrint("doWaitForSelected -> %s" %unitDataString)
+ self.bWaitForSelectedUnit = True
+ self.SelectedUnit = unitDataString
+
+# def doSelect(self):
+# self.bWaitForSelectedUnit = False
+# self.SelectedUnit = -1
+
+ def setWaitForAction(self, ActionMissionType, ActionInterfaceModeTypes,
ActionCommandTypes, scriptName, scriptData, ValidPlot):
+ self.szScriptName = scriptName
+ self.szScriptData = scriptData
+ self.bForceAction = True
+ self.iForceActionMissionType = int(ActionMissionType)
+ self.iForceActionInterfaceModeTypes = int( ActionInterfaceModeTypes )
+ self.iForceActionCommandTypes = int( ActionCommandTypes )
+ self.ValidPlots = ValidPlot
+
+ def setBuildImprovement(self, BuildType):
+ self.iForcedBuildImprovement = CvUtil.findInfoTypeNum(gc.getBuildInfo,
gc.getNumBuildInfos(), BuildType)
+
+
+ def isNotAllowActionMission(self, pPlot, iActionMissionType):
+ if CyInterface().getHeadSelectedUnit():
+ if CyInterface().getHeadSelectedUnit().getScriptData() ==
self.szScriptData:
+ if self.bForceAction and iActionMissionType ==
self.iForceActionMissionType:
+ if iActionMissionType == int(MissionTypes.MISSION_MOVE_TO) and
self.isValidPlot(pPlot):
+ return False
+ elif iActionMissionType != int(MissionTypes.MISSION_MOVE_TO):
+ return False
+ return True
+ return False
+
+ def isNotAllowedBuildType(self, iActionBuildType):
+ if self.bDisableBuildRoads == True and iActionBuildType ==
CvUtil.findInfoTypeNum(gc.getBuildInfo,
gc.getNumBuildInfos(), "BUILD_ROAD"):
+ return True
+ if self.iForcedBuildImprovement == -1:
+ return False
+ elif iActionBuildType == self.iForcedBuildImprovement:
+ return False
+ return True
+
+ def isValidPlot(self, pPlot):
+ iX = pPlot.getX()
+ iY = pPlot.getY()
+ numValidMovementPlots = len(self.ValidPlots)
+ print ("numValidPlots %d" %(numValidMovementPlots))
+ if numValidMovementPlots == 1:
+ pX,pY = self.ValidPlots[0]
+ if iX == pX and iY == pY:
+ return True
+ elif numValidMovementPlots > 1:
+ for plot in self.ValidPlots:
+ pX, pY = plot
+ if iX == pX and iY == pY:
+ return True
+ return False
+
+ def doErrorPopup (self, szErrorMessage):
+ popup = PyPopup.PyPopup()
+ popup.setBodyString(CyTranslator().getText(szErrorMessage, ()))
+ popup.setSize(512,192)
+ popup.setPosition(320,256)
+ popup.launch()
+
+ def setHighAdvisorCenter(self):
+ CyCamera().SetViewPortCenter(NiPoint2(0.5, 0.4))
+
+ def setIndicatorPlot ( self, iX, iY, szColor ):
+ self.iIndicatorPlotX = iX
+ self.iIndicatorPlotY = iY
+ self.szIndicatorColor = szColor
+
+ def showIndicatorPlot( self ):
+ CyEngine().addColoredPlotAlt( self.iIndicatorPlotX,
self.iIndicatorPlotY, PlotStyles.PLOT_STYLE_CIRCLE,1,
self.szIndicatorColor, 1 )
+
+tutorial = CvTutorial()
=======================================
--- /dev/null
+++ /trunk/The History of Three Kingdoms/Documents/HoTK_Readme_EN.html Tue
Sep 29 23:51:43 2009
@@ -0,0 +1,788 @@
+
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<base target="_top">
+<style type="text/css">
+
+
+/* default css */
+
+table {
+ font-size: 1em;
+ line-height: inherit;
+ border-collapse: collapse;
+}
+
+
+tr {
+
+ text-align: left;
+
+}
+
+
+div, address, ol, ul, li, option, select {
+ margin-top: 0px;
+ margin-bottom: 0px;
+}
+
+p {
+ margin: 0px;
+}
+
+
+pre {
+ font-family: Courier New;
+ white-space: pre-wrap;
+ margin:0;
+}
+
+body {
+ margin: 6px;
+ padding: 0px;
+ font-family: Verdana, sans-serif;
+ font-size: 10pt;
+ background-color: #ffffff;
+}
+
+
+img {
+ -moz-force-broken-image-icon: 1;
+}
+
+@media screen {
+ html.pageview {
+ background-color: #f3f3f3 !important;
+ }
+
+
+
+ body {
+ min-height: 1100px;
+
+ counter-reset: __goog_page__;
+ }
+ * html body {
+ height: 1100px;
+ }
+ .pageview body {
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ border-right: 2px solid #bbb;
+ border-bottom: 2px solid #bbb;
+ width: 648px !important;
+ margin: 15px auto 25px;
+ padding: 40px 50px;
+ }
+ /* IE6 */
+ * html {
+ overflow-y: scroll;
+ }
+ * html.pageview body {
+ overflow-x: auto;
+ }
+ /* Prevent repaint errors when scrolling in Safari. This "Star-7" css
hack
+ targets Safari 3.1, but not WebKit nightlies and presumably Safari 4.
+ That's OK because this bug is fixed in WebKit nightlies/Safari 4 :-).
*/
+ html*#wys_frame::before {
+ content: '\A0';
+ position: fixed;
+ overflow: hidden;
+ width: 0;
+ height: 0;
+ top: 0;
+ left: 0;
+ }
+
+
+
+
+ .writely-callout-data {
+ display: none;
+ *display: inline-block;
+ *width: 0;
+ *height: 0;
+ *overflow: hidden;
+ }
+ .writely-footnote-marker {
+ background-image: url('MISSING');
+ background-color: transparent;
+ background-repeat: no-repeat;
+ width: 7px;
+ overflow: hidden;
+ height: 16px;
+ vertical-align: top;
+
+
+ -moz-user-select: none;
+ }
+ .editor .writely-footnote-marker {
+ cursor: move;
+ }
+ .writely-footnote-marker-highlight {
+ background-position: -15px 0;
+ -moz-user-select: text;
+ }
+ .writely-footnote-hide-selection ::-moz-selection, .writely-footnote-hide-selection::-moz-selection
{
+ background: transparent;
+ }
+ .writely-footnote-hide-selection ::selection, .writely-footnote-hide-selection::selection
{
+ background: transparent;
+ }
+ .writely-footnote-hide-selection {
+ cursor: move;
+ }
+
+
+ .editor .writely-comment-yellow {
+ background-color: #FF9;
+ background-position: -240px 0;
+ }
+ .editor .writely-comment-yellow-hover {
+ background-color: #FF0;
+ background-position: -224px 0;
+ }
+ .editor .writely-comment-blue {
+ background-color: #C0D3FF;
+ background-position: -16px 0;
+ }
+ .editor .writely-comment-blue-hover {
+ background-color: #6292FE;
+ background-position: 0 0;
+ }
+ .editor .writely-comment-orange {
+ background-color: #FFDEAD;
+ background-position: -80px 0;
+ }
+ .editor .writely-comment-orange-hover {
+ background-color: #F90;
+ background-position: -64px 0;
+ }
+ .editor .writely-comment-green {
+ background-color: #99FBB3;
+ background-position: -48px 0;
+ }
+ .editor .writely-comment-green-hover {
+ background-color: #00F442;
+ background-position: -32px 0;
+ }
+ .editor .writely-comment-cyan {
+ background-color: #CFF;
+ background-position: -208px 0;
+ }
+ .editor .writely-comment-cyan-hover {
+ background-color: #0FF;
+ background-position: -192px 0;
+ }
+ .editor .writely-comment-purple {
+ background-color: #EBCCFF;
+ background-position: -144px 0;
+ }
+ .editor .writely-comment-purple-hover {
+ background-color: #90F;
+ background-position: -128px 0;
+ }
+ .editor .writely-comment-magenta {
+ background-color: #FCF;
+ background-position: -112px 0;
+ }
+ .editor .writely-comment-magenta-hover {
+ background-color: #F0F;
+ background-position: -96px 0;
+ }
+ .editor .writely-comment-red {
+ background-color: #FFCACA;
+ background-position: -176px 0;
+ }
+ .editor .writely-comment-red-hover {
+ background-color: #FF7A7A;
+ background-position: -160px 0;
+ }
+
+ .editor .writely-comment-marker {
+ background-image: url('MISSING');
+ background-color: transparent;
+ padding-right: 11px;
+ background-repeat: no-repeat;
+ width: 16px;
+ height: 16px;
+ -moz-user-select: none;
+ }
+
+ .editor .writely-comment-hidden {
+ padding: 0;
+ background: none;
+ }
+ .editor .writely-comment-marker-hidden {
+ background: none;
+ padding: 0;
+ width: 0;
+ }
+ .editor .writely-comment-none {
+ opacity: .2;
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20);
+ -moz-opacity: .2;
+ }
+ .editor .writely-comment-none-hover {
+ opacity: .2;
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20);
+ -moz-opacity: .2;
+ }
+
+
+
+
+ .br_fix span+br:not(:-moz-last-node) {
+
+ position:relative;
+
+ left: -1ex
+
+ }
+
+
+ #cb-p-tgt {
+ font-size: 8pt;
+ padding: .4em;
+ background-color: #ddd;
+ color: #333;
+ }
+ #cb-p-tgt-can {
+ text-decoration: underline;
+ color: #36c;
+ font-weight: bold;
+ margin-left: 2em;
+ }
+ #cb-p-tgt .spin {
+ width: 16px;
+ height: 16px;
+ background: url(//
ssl.gstatic.com/docs/clipboard/spin_16o.gif)
no-repeat;
+ }
+}
+
+h6 { font-size: 8pt }
+h5 { font-size: 8pt }
+h4 { font-size: 10pt }
+h3 { font-size: 12pt }
+h2 { font-size: 14pt }
+h1 { font-size: 18pt }
+
+blockquote {padding: 10px; border: 1px #DDD dashed }
+
+.webkit-indent-blockquote { border: none; }
+
+a img {border: 0}
+
+.pb {
+ border-width: 0;
+ page-break-after: always;
+ /* We don't want this to be resizeable, so enforce a width and height
+ using !important */
+ height: 1px !important;
+ width: 100% !important;
+}
+
+.editor .pb {
+ border-top: 1px dashed #C0C0C0;
+ border-bottom: 1px dashed #C0C0C0;
+}
+
+div.google_header, div.google_footer {
+ position: relative;
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
+
+/* Table of contents */
+.editor div.writely-toc {
+ background-color: #f3f3f3;
+ border: 1px solid #ccc;
+}
+.writely-toc > ol {
+ padding-left: 3em;
+ font-weight: bold;
+}
+ol.writely-toc-subheading {
+ padding-left: 1em;
+ font-weight: normal;
+}
+/* IE6 only */
+* html writely-toc ol {
+ list-style-position: inside;
+}
+.writely-toc-none {
+ list-style-type: none;
+}
+.writely-toc-decimal {
+ list-style-type: decimal;
+}
+.writely-toc-upper-alpha {
+ list-style-type: upper-alpha;
+}
+.writely-toc-lower-alpha {
+ list-style-type: lower-alpha;
+}
+.writely-toc-upper-roman {
+ list-style-type: upper-roman;
+}
+.writely-toc-lower-roman {
+ list-style-type: lower-roman;
+}
+.writely-toc-disc {
+ list-style-type: disc;
+}
+
+/* Ordered lists converted to numbered lists can preserve ordered types,
and
+ vice versa. This is confusing, so disallow it */
+ul[type="i"], ul[type="I"], ul[type="1"], ul[type="a"], ul[type="A"] {
+ list-style-type: disc;
+}
+
+ol[type="disc"], ol[type="circle"], ol[type="square"] {
+ list-style-type: decimal;
+}
+
+/* end default css */
+
+
+ /* default print css */
+
+ @media print {
+ body {
+ padding: 0;
+ margin: 0;
+ }
+
+ div.google_header, div.google_footer {
+ display: block;
+ min-height: 0;
+ border: none;
+ }
+
+ div.google_header {
+ flow: static(header);
+ }
+
+ /* used to insert page numbers */
+ div.google_header::before, div.google_footer::before {
+ position: absolute;
+ top: 0;
+ }
+
+ div.google_footer {
+ flow: static(footer);
+ }
+
+ /* always consider this element at the start of the doc */
+ div#google_footer {
+ flow: static(footer, start);
+ }
+
+ span.google_pagenumber {
+ content: counter(page);
+ }
+
+ span.google_pagecount {
+ content: counter(pages);
+ }
+
+ .endnotes {
+ page: endnote;
+ }
+
+ /* MLA specifies that endnotes title should be 1" margin from the top
of the page. */
+ @page endnote {
+ margin-top: 1in;
+ }
+
+ callout.google_footnote {
+
+ display: prince-footnote;
+ footnote-style-position: inside;
+ /* These styles keep the footnote from taking on the style of the
text
+ surrounding the footnote marker. They can be overridden in the
+ document CSS. */
+ color: #000;
+ font-family: Times New Roman;
+ font-size: 12.0pt;
+ font-weight: normal;
+ }
+
+ /* Table of contents */
+ #WritelyTableOfContents a::after {
+ content: leader('.') target-counter(attr(href), page);
+ }
+
+ #WritelyTableOfContents a {
+ text-decoration: none;
+ color: black;
+ }
+ }
+
+ @page {
+ @top {
+ content: flow(header);
+ }
+ @bottom {
+ content: flow(footer);
+ }
+ @footnotes {
+ border-top: solid black thin;
+ padding-top: 8pt;
+ }
+ }
+ /* end default print css */
+
+
+/* custom css */
+
+
+/* end custom css */
+
+/* ui edited css */
+
+body {
+ font-family: Times New Roman;
+
+ font-size: 12.0pt;
+ line-height: normal;
+ background-color: #ffffff;
+}
+/* end ui edited css */
+
+
+/* editor CSS */
+.editor a:visited {color: #551A8B}
+.editor table.zeroBorder {border: 1px dotted gray}
+.editor table.zeroBorder td {border: 1px dotted gray}
+.editor table.zeroBorder th {border: 1px dotted gray}
+
+
+.editor div.google_header, .editor div.google_footer {
+ border: 2px #DDDDDD dashed;
+ position: static;
+ width: 100%;
+ min-height: 2em;
+}
+
+.editor .misspell {background-color: yellow}
+
+.editor .writely-comment {
+ font-size: 9pt;
+ line-height: 1.4;
+ padding: 1px;
+ border: 1px dashed #C0C0C0
+}
+
+
+/* end editor CSS */
+
+</style>
+
+
+ <title>Readme</title>
+
+</head>
+
+<body
+
+ >
+
+
+
+<p class=western>
+ [BTS] The History of Three Kingdoms Release 2.5---Supreme Commander
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+</p>
+<div>
+</div>
+<div>
+ <p class=western style=" MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ Compatible with BtS 3.19
+ </p>
+ <p class=western style=" MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ Need testing as to multiplayer compatibility
+ </p>
+</div>
+<p>
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western style=TEXT-ALIGN:left>
+ INSTALLATION:
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ 1. Delete old version.
+</p>
+<p class=western>
+ 2. Run the installer.
+</p>
+<p class=western>
+ 3. Install Official Music Pack. Unzip the downloaded zip file (music
pack is the same with V2.4, so you don't have to redownload it if you still
keeps that file), copy the 'Assets' folder into your Beyond the
Sword\Mods\The History of Three Kingdoms folder, overwrite existing files.
This is a must unless you prefer mute game.
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ ABOUT THE MOD:
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ This Mod is a historically based fan Mod that covers the time of Three
Kingdoms period of China (184 AD – 280 AD). Wiki link: <font
color=#0000ff><u><a
href=
http://en.wikipedia.org/wiki/Three_Kingdoms>
http://en.wikipedia.org/wiki/Three_Kingdoms</a></u></font>
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ Although relatively short, this historical period has been greatly
romanticised in the cultures of China, Japan, Korea, and Vietnam. It has
been celebrated and popularised in operas, folk stories, novels and in more
recent times, films, television serials, and video games such as <i>Dynasty
Warriors</i> series.
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ The best known of these is undoubtedly the Romance of the Three
Kingdoms, a fictional account of the period which draws heavily on history.
English Version: <font color=#0000ff><u><a
href=
http://threekingdoms.com/>
http://threekingdoms.com/</a></u></font>
+</p>
+<p class=western>
+ <br>
+</p>
+<h3>
+ What's new in Release 2.5---Supreme Commander?
+</h3>
+<p class=western>
+ Hero Capture, Execute, Persuade, Release and Trade;
+</p>
+<p class=western>
+ Army system (turned off by default; to turn on, play custom scenarios or
custom games, and select 'Enable Army' game option)
+</p>
+<p class=western>
+ Revamped Random Hero
+</p>
+<p class=western>
+ Revamped Legion System with the introduction of two hero attributes:
Leadership and Might
+</p>
+<p class=western>
+ Leader succession, heroes can become new leaders
+</p>
+<p class=western>
+ (see in game 'HoTK concept' for detail)
+</p>
+<h3>
+ What's new in Release 2.4---Nine Transformation?
+</h3>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ <u><i>Random Hero</i></u>
+</p>
+<div>
+ <br>
+</div>
+<div>
+ <u><i>Dynamic Initial Unit</i></u>
+</div>
+<div>
+ <div>
+ <br>
+ </div>
+ <div>
+ <u><i>Nine Transformation</i></u>
+ </div>
+ <div>
+ <div>
+ <br>
+ </div>
+ </div>
+ <div>
+ <u><i>New Heroes, Promotions and Scenario</i></u>
+ </div>
+ <div>
+ <br>
+ </div>
+ <div>
+ <p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <u><i>Double the Speed</i></u>
+ </p>
+ </div>
+</div>
+<div>
+ <br>
+</div>
+<p>
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+</p>
+<h3>
+ FEATURES for Release 2:
+</h3>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <u><i>Introducing Combat Heroes</i></u>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <u><i>Introducing Legions</i></u>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <u><i>New Promotions---New Interactivity</i></u>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <u><i>AI Knows How</i></u>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <u><i>Revamped Interface</i></u>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <u><i>More Maps and Scenarios</i></u>
+</p>
+<p>
+</p>
+<p class=western>
+ <br>
+</p>
+<h3>
+ FEATURES for Release 1:
+</h3>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ <u><i> New Civilizations with Unique Civilization Trait</i></u>
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ <u><i>All New Leaders and Leader Trait</i></u>
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ <u><i> Brand New Civics</i></u>
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ <u><i> All New Units</i></u>
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ <u><i> All New wonders and Building</i></u>
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+</p>
+<div id=q:r1 style=TEXT-ALIGN:left>
+ <i><u>New Beliefs System and 'Religion Buildings'</u></i>
+</div>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ <u><i>Emperor System</i></u>
+</p>
+<p class=western>
+ <br>
+</p>
+<div id=cr6s style=TEXT-ALIGN:left>
+ <i><u>Enhanced Diplomacy<span
style=FONT-STYLE:normal> </span></u></i>
+</div>
+<div id=t689 style=TEXT-ALIGN:left>
+ <br>
+</div>
+<div id=lq22 style=TEXT-ALIGN:left>
+ <i><u>Map of China and Scenarios</u></i>
+</div>
+<p>
+ <br>
+</p>
+<p class=western>
+ <font class=Apple-style-span color=#FF0000><u> INCLUDED MODS: </u></font>
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ Better AI 0.81
+</p>
+<p class=western>
+ BUG MOD 4.0
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ <font class=Apple-style-span color=#FF0000><u> CREDITS and THANKS:
</u></font>
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ HoTK Team: stmartin, Bakuel, xxhe, Khyron, koap
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ The BUG Team; jdog5000; Dresden & Solver; asioasioasio; seZereth;
Dale; Moctezuma
+</p>
+<p class=western>
+ HrochLand; Walter Hawkwood; Danrell; Chuggi; Wolfshanze; White Rabbit;
Kael; Rhye; Tsentom1; Chenghis Kai; freesand; ztjal; Fog; QiDongYeRen; and
KOEI for its Leaderhead Art.
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ If we left anyone out, it wasn’t intentional, please let us know and we
will include them in the list.
+</p>
+<p class=western>
+ <br>
+</p>
+<p class=western>
+ If you have any ideas, questions, feedbacks or requests, please post up
on the forum: <a
href=
http://forums.civfanatics.com/forumdisplay.php?f=346 id=j51x
title=
http://forums.civfanatics.com/forumdisplay.php?f=346>
http://forums.civfanatics.com/forumdisplay.php?f=346</a>
+</p>
+<br></body>
+</html>
=======================================
--- /dev/null
+++ /trunk/The History of Three Kingdoms/Documents/三国春秋简介.html Tue
Sep 29 23:51:43 2009
@@ -0,0 +1,807 @@
+
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
+
+<html>
+
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+
+<base target="_top">
+<style type="text/css">
+
+
+/* default css */
+
+table {
+ font-size: 1em;
+ line-height: inherit;
+ border-collapse: collapse;
+}
+
+
+tr {
+
+ text-align: left;
+
+}
+
+
+div, address, ol, ul, li, option, select {
+ margin-top: 0px;
+ margin-bottom: 0px;
+}
+
+p {
+ margin: 0px;
+}
+
+
+pre {
+ font-family: Courier New;
+ white-space: pre-wrap;
+ margin:0;
+}
+
+body {
+ margin: 6px;
+ padding: 0px;
+ font-family: Verdana, sans-serif;
+ font-size: 10pt;
+ background-color: #ffffff;
+}
+
+
+img {
+ -moz-force-broken-image-icon: 1;
+}
+
+@media screen {
+ html.pageview {
+ background-color: #f3f3f3 !important;
+ }
+
+
+
+ body {
+ min-height: 1100px;
+
+ counter-reset: __goog_page__;
+ }
+ * html body {
+ height: 1100px;
+ }
+ .pageview body {
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ border-right: 2px solid #bbb;
+ border-bottom: 2px solid #bbb;
+ width: 648px !important;
+ margin: 15px auto 25px;
+ padding: 40px 50px;
+ }
+ /* IE6 */
+ * html {
+ overflow-y: scroll;
+ }
+ * html.pageview body {
+ overflow-x: auto;
+ }
+ /* Prevent repaint errors when scrolling in Safari. This "Star-7" css
hack
+ targets Safari 3.1, but not WebKit nightlies and presumably Safari 4.
+ That's OK because this bug is fixed in WebKit nightlies/Safari 4 :-).
*/
+ html*#wys_frame::before {
+ content: '\A0';
+ position: fixed;
+ overflow: hidden;
+ width: 0;
+ height: 0;
+ top: 0;
+ left: 0;
+ }
+
+
+
+
+ .writely-callout-data {
+ display: none;
+ *display: inline-block;
+ *width: 0;
+ *height: 0;
+ *overflow: hidden;
+ }
+ .writely-footnote-marker {
+ background-image: url('MISSING');
+ background-color: transparent;
+ background-repeat: no-repeat;
+ width: 7px;
+ overflow: hidden;
+ height: 16px;
+ vertical-align: top;
+
+
+ -moz-user-select: none;
+ }
+ .editor .writely-footnote-marker {
+ cursor: move;
+ }
+ .writely-footnote-marker-highlight {
+ background-position: -15px 0;
+ -moz-user-select: text;
+ }
+ .writely-footnote-hide-selection ::-moz-selection, .writely-footnote-hide-selection::-moz-selection
{
+ background: transparent;
+ }
+ .writely-footnote-hide-selection ::selection, .writely-footnote-hide-selection::selection
{
+ background: transparent;
+ }
+ .writely-footnote-hide-selection {
+ cursor: move;
+ }
+
+
+ .editor .writely-comment-yellow {
+ background-color: #FF9;
+ background-position: -240px 0;
+ }
+ .editor .writely-comment-yellow-hover {
+ background-color: #FF0;
+ background-position: -224px 0;
+ }
+ .editor .writely-comment-blue {
+ background-color: #C0D3FF;
+ background-position: -16px 0;
+ }
+ .editor .writely-comment-blue-hover {
+ background-color: #6292FE;
+ background-position: 0 0;
+ }
+ .editor .writely-comment-orange {
+ background-color: #FFDEAD;
+ background-position: -80px 0;
+ }
+ .editor .writely-comment-orange-hover {
+ background-color: #F90;
+ background-position: -64px 0;
+ }
+ .editor .writely-comment-green {
+ background-color: #99FBB3;
+ background-position: -48px 0;
+ }
+ .editor .writely-comment-green-hover {
+ background-color: #00F442;
+ background-position: -32px 0;
+ }
+ .editor .writely-comment-cyan {
+ background-color: #CFF;
+ background-position: -208px 0;
+ }
+ .editor .writely-comment-cyan-hover {
+ background-color: #0FF;
+ background-position: -192px 0;
+ }
+ .editor .writely-comment-purple {
+ background-color: #EBCCFF;
+ background-position: -144px 0;
+ }
+ .editor .writely-comment-purple-hover {
+ background-color: #90F;
+ background-position: -128px 0;
+ }
+ .editor .writely-comment-magenta {
+ background-color: #FCF;
+ background-position: -112px 0;
+ }
+ .editor .writely-comment-magenta-hover {
+ background-color: #F0F;
+ background-position: -96px 0;
+ }
+ .editor .writely-comment-red {
+ background-color: #FFCACA;
+ background-position: -176px 0;
+ }
+ .editor .writely-comment-red-hover {
+ background-color: #FF7A7A;
+ background-position: -160px 0;
+ }
+
+ .editor .writely-comment-marker {
+ background-image: url('MISSING');
+ background-color: transparent;
+ padding-right: 11px;
+ background-repeat: no-repeat;
+ width: 16px;
+ height: 16px;
+ -moz-user-select: none;
+ }
+
+ .editor .writely-comment-hidden {
+ padding: 0;
+ background: none;
+ }
+ .editor .writely-comment-marker-hidden {
+ background: none;
+ padding: 0;
+ width: 0;
+ }
+ .editor .writely-comment-none {
+ opacity: .2;
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20);
+ -moz-opacity: .2;
+ }
+ .editor .writely-comment-none-hover {
+ opacity: .2;
+ filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20);
+ -moz-opacity: .2;
+ }
+
+
+
+
+ .br_fix span+br:not(:-moz-last-node) {
+
+ position:relative;
+
+ left: -1ex
+
+ }
+
+
+ #cb-p-tgt {
+ font-size: 8pt;
+ padding: .4em;
+ background-color: #ddd;
+ color: #333;
+ }
+ #cb-p-tgt-can {
+ text-decoration: underline;
+ color: #36c;
+ font-weight: bold;
+ margin-left: 2em;
+ }
+ #cb-p-tgt .spin {
+ width: 16px;
+ height: 16px;
+ background: url(//
ssl.gstatic.com/docs/clipboard/spin_16o.gif)
no-repeat;
+ }
+}
+
+h6 { font-size: 8pt }
+h5 { font-size: 8pt }
+h4 { font-size: 10pt }
+h3 { font-size: 12pt }
+h2 { font-size: 14pt }
+h1 { font-size: 18pt }
+
+blockquote {padding: 10px; border: 1px #DDD dashed }
+
+.webkit-indent-blockquote { border: none; }
+
+a img {border: 0}
+
+.pb {
+ border-width: 0;
+ page-break-after: always;
+ /* We don't want this to be resizeable, so enforce a width and height
+ using !important */
+ height: 1px !important;
+ width: 100% !important;
+}
+
+.editor .pb {
+ border-top: 1px dashed #C0C0C0;
+ border-bottom: 1px dashed #C0C0C0;
+}
+
+div.google_header, div.google_footer {
+ position: relative;
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
+
+/* Table of contents */
+.editor div.writely-toc {
+ background-color: #f3f3f3;
+ border: 1px solid #ccc;
+}
+.writely-toc > ol {
+ padding-left: 3em;
+ font-weight: bold;
+}
+ol.writely-toc-subheading {
+ padding-left: 1em;
+ font-weight: normal;
+}
+/* IE6 only */
+* html writely-toc ol {
+ list-style-position: inside;
+}
+.writely-toc-none {
+ list-style-type: none;
+}
+.writely-toc-decimal {
+ list-style-type: decimal;
+}
+.writely-toc-upper-alpha {
+ list-style-type: upper-alpha;
+}
+.writely-toc-lower-alpha {
+ list-style-type: lower-alpha;
+}
+.writely-toc-upper-roman {
+ list-style-type: upper-roman;
+}
+.writely-toc-lower-roman {
+ list-style-type: lower-roman;
+}
+.writely-toc-disc {
+ list-style-type: disc;
+}
+
+/* Ordered lists converted to numbered lists can preserve ordered types,
and
+ vice versa. This is confusing, so disallow it */
+ul[type="i"], ul[type="I"], ul[type="1"], ul[type="a"], ul[type="A"] {
+ list-style-type: disc;
+}
+
+ol[type="disc"], ol[type="circle"], ol[type="square"] {
+ list-style-type: decimal;
+}
+
+/* end default css */
+
+
+ /* default print css */
+
+ @media print {
+ body {
+ padding: 0;
+ margin: 0;
+ }
+
+ div.google_header, div.google_footer {
+ display: block;
+ min-height: 0;
+ border: none;
+ }
+
+ div.google_header {
+ flow: static(header);
+ }
+
+ /* used to insert page numbers */
+ div.google_header::before, div.google_footer::before {
+ position: absolute;
+ top: 0;
+ }
+
+ div.google_footer {
+ flow: static(footer);
+ }
+
+ /* always consider this element at the start of the doc */
+ div#google_footer {
+ flow: static(footer, start);
+ }
+
+ span.google_pagenumber {
+ content: counter(page);
+ }
+
+ span.google_pagecount {
+ content: counter(pages);
+ }
+
+ .endnotes {
+ page: endnote;
+ }
+
+ /* MLA specifies that endnotes title should be 1" margin from the top
of the page. */
+ @page endnote {
+ margin-top: 1in;
+ }
+
+ callout.google_footnote {
+
+ display: prince-footnote;
+ footnote-style-position: inside;
+ /* These styles keep the footnote from taking on the style of the
text
+ surrounding the footnote marker. They can be overridden in the
+ document CSS. */
+ color: #000;
+ font-family: Verdana;
+ font-size: 10.0pt;
+ font-weight: normal;
+ }
+
+ /* Table of contents */
+ #WritelyTableOfContents a::after {
+ content: leader('.') target-counter(attr(href), page);
+ }
+
+ #WritelyTableOfContents a {
+ text-decoration: none;
+ color: black;
+ }
+ }
+
+ @page {
+ @top {
+ content: flow(header);
+ }
+ @bottom {
+ content: flow(footer);
+ }
+ @footnotes {
+ border-top: solid black thin;
+ padding-top: 8pt;
+ }
+ }
+ /* end default print css */
+
+
+/* custom css */
+
+
+/* end custom css */
+
+/* ui edited css */
+
+body {
+ font-family: Verdana;
+
+ font-size: 10.0pt;
+ line-height: normal;
+ background-color: #ffffff;
+}
+/* end ui edited css */
+
+
+/* editor CSS */
+.editor a:visited {color: #551A8B}
+.editor table.zeroBorder {border: 1px dotted gray}
+.editor table.zeroBorder td {border: 1px dotted gray}
+.editor table.zeroBorder th {border: 1px dotted gray}
+
+
+.editor div.google_header, .editor div.google_footer {
+ border: 2px #DDDDDD dashed;
+ position: static;
+ width: 100%;
+ min-height: 2em;
+}
+
+.editor .misspell {background-color: yellow}
+
+.editor .writely-comment {
+ font-size: 9pt;
+ line-height: 1.4;
+ padding: 1px;
+ border: 1px dashed #C0C0C0
+}
+
+
+/* end editor CSS */
+
+</style>
+
+
+ <title>Mod简介</title>
+
+</head>
+
+<body
+
+ >
+
+
+
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ [BTS 3.17] 三国春秋V2.5版——元帅!
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px;
TEXT-ALIGN:left">
+ 安装说明:
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ 1. 删除旧版三国春秋。并确保文明IV + 刀剑之上正确安装。刀剑之上需要升级到
3.19版后安装塞爱维最新汉化包。
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ 2. 运行下载的安装包exe文件。
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ 3. 安装官方音乐包。解压下载的压缩文件(与2.4版的音乐包文件相同,故可直接用
2.4版的音乐包zip文件,不必重复下载),将其中的‘Assets’文件夹拷贝到你的Beyond
the Sword\Mods\The History of Three Kingdoms文件夹,覆盖原文件。若不安装音乐
包,则外交音乐和后期背景音乐将缺失。
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<h2>
+ 2.5版的更新有哪些?
+</h2>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <i><u>英雄俘虏、劝降、斩首、释放、交易</u></i>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <i><u>集团军系统</u></i>(默认未开启;要开启集团军系统,选择自定义剧情或
自定义游戏,并选中“启用集团军”选项)
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <i><u>改良的随机英雄</u></i>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <i><u>改良的军团系统,并引入统帅力和武力</u></i>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <i><u>领袖更替,任何英雄都可以成为领袖</u></i>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ (详细信息请查阅游戏中的“三国春秋概念”)
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<h2>
+ 2.4版的更新有哪些?
+</h2>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <u><i>随机英雄</i></u>
+</p>
+<div>
+ <div>
+ </div>
+</div>
+<div>
+ <br>
+</div>
+<div>
+ <u><i>非固定初始兵力</i></u>
+</div>
+<div>
+ <div>
+ <div>
+ </div>
+ </div>
+ <div>
+ <br>
+ </div>
+ <div>
+ <u><i>九变</i></u>
+ </div>
+ <div>
+ <div>
+ <div>
+ </div>
+ </div>
+ <div>
+ <br>
+ </div>
+ </div>
+ <div>
+ <u><i>新英雄,晋升,剧本以及增强的AI</i></u>
+ </div>
+ <div>
+ <br>
+ </div>
+ <div>
+ <p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <i><u>速度加倍</u></i>
+ </p>
+ </div>
+</div>
+<div>
+ <br>
+</div>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+</p>
+<h2>
+ V2版的内容简介
+</h2>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <i><u>引入战争英雄</u></i>
+</p>
+<div>
+</div>
+<p>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <u><i>军团系统</i></u>
+</p>
+<div>
+</div>
+<p>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <i><u>英雄晋升</u></i>
+</p>
+<div>
+</div>
+<p>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <u><i>AI能力</i></u>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <i><u>改进的界面</u></i>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <i><u>地图与剧本</u></i>
+</p>
+<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<h2>
+ V1版的内容简介
+</h2>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <i><u>全新的三国势力、领袖、科技树、单位、政体、奇观、建筑</u></i>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <i><u>城市奇观</u></i>
+</p>
+<div>
+</div>
+<p>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+</p>
+<div id=pxmq style=TEXT-ALIGN:left>
+ <i><u>势力特性</u></i>
+</div>
+<div>
+ <br>
+</div>
+<div>
+ <i><u>政府建筑</u></i>
+</div>
+<div>
+ <br>
+</div>
+<div>
+</div>
+<p>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <i><u>汉朝皇帝</u></i>
+</p>
+<div>
+ <br>
+</div>
+<div>
+ <i><u>外交投票</u></i>
+</div>
+<div>
+ <br>
+</div>
+<div>
+ <i><u>外交态度</u></i>
+</div>
+<div>
+ <div>
+ </div>
+</div>
+<div>
+ <br>
+</div>
+<div>
+</div>
+<p>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <font class=Apple-style-span color=#FF0000><u>整合的Mod</u></font>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ Better AI 0.81
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ BUG MOD 4.0
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <font class=Apple-style-span color=#FF0000><u>制作人与鸣谢</u></font>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ 制作人员:西艾薇.I.王子,孟仲玄,Bakuel,Khyron,koap
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ 特别感谢:
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ The BUG Team; jdog5000; Dresden & Solver; asioasioasio; seZereth;
Dale; Moctezuma; HrochLand; Walter Hawkwood; Danrell; Chuggi; Wolfshanze;
White Rabbit; Kael; Rhye; Tsentom1; Chenghis Kai; freesand; ztjal; Fog; 齐东
野人;(若有遗漏是无心之失,请与我们联络)
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ 特别感谢:
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ <br>
+</p>
+<p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
+ KOEI的三国游戏音乐和人物头像
+</p>
+<div>
+ <br>
+</div>
+<br></body>
+</html>
=======================================
--- /trunk/The History of Three Kingdoms/Documents/ReadMe for HoTK Release
2.4.html Tue Aug 18 10:20:55 2009
+++ /dev/null
@@ -1,1033 +0,0 @@
-
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
-
-<html>
-
-
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-
-<base target="_top">
-<style type="text/css">
-
-
-/* default css */
-
-table {
- font-size: 1em;
- line-height: inherit;
- border-collapse: collapse;
-}
-
-
-tr {
-
- text-align: left;
-
-}
-
-
-div, address, ol, ul, li, option, select {
- margin-top: 0px;
- margin-bottom: 0px;
-}
-
-p {
- margin: 0px;
-}
-
-
-pre {
- font-family: Courier New;
- white-space: pre-wrap;
- margin:0;
-}
-
-body {
- margin: 6px;
- padding: 0px;
- font-family: Verdana, sans-serif;
- font-size: 10pt;
- background-color: #ffffff;
-}
-
-
-img {
- -moz-force-broken-image-icon: 1;
-}
-
-@media screen {
- html.pageview {
- background-color: #f3f3f3 !important;
- }
-
-
-
- body {
- min-height: 1100px;
-
- counter-reset: __goog_page__;
- }
- * html body {
- height: 1100px;
- }
- .pageview body {
- border-top: 1px solid #ccc;
- border-left: 1px solid #ccc;
- border-right: 2px solid #bbb;
- border-bottom: 2px solid #bbb;
- width: 648px !important;
- margin: 15px auto 25px;
- padding: 40px 50px;
- }
- /* IE6 */
- * html {
- overflow-y: scroll;
- }
- * html.pageview body {
- overflow-x: auto;
- }
- /* Prevent repaint errors when scrolling in Safari. This "Star-7" css
hack
- targets Safari 3.1, but not WebKit nightlies and presumably Safari 4.
- That's OK because this bug is fixed in WebKit nightlies/Safari 4 :-).
*/
- html*#wys_frame::before {
- content: '\A0';
- position: fixed;
- overflow: hidden;
- width: 0;
- height: 0;
- top: 0;
- left: 0;
- }
-
-
-
-
- .writely-callout-data {
- display: none;
- *display: inline-block;
- *width: 0;
- *height: 0;
- *overflow: hidden;
- }
- .writely-footnote-marker {
- background-image: url('MISSING');
- background-color: transparent;
- background-repeat: no-repeat;
- width: 7px;
- overflow: hidden;
- height: 16px;
- vertical-align: top;
-
-
- -moz-user-select: none;
- }
- .editor .writely-footnote-marker {
- cursor: move;
- }
- .writely-footnote-marker-highlight {
- background-position: -15px 0;
- -moz-user-select: text;
- }
- .writely-footnote-hide-selection ::-moz-selection, .writely-footnote-hide-selection::-moz-selection
{
- background: transparent;
- }
- .writely-footnote-hide-selection ::selection, .writely-footnote-hide-selection::selection
{
- background: transparent;
- }
- .writely-footnote-hide-selection {
- cursor: move;
- }
-
-
- .editor .writely-comment-yellow {
- background-color: #FF9;
- background-position: -240px 0;
- }
- .editor .writely-comment-yellow-hover {
- background-color: #FF0;
- background-position: -224px 0;
- }
- .editor .writely-comment-blue {
- background-color: #C0D3FF;
- background-position: -16px 0;
- }
- .editor .writely-comment-blue-hover {
- background-color: #6292FE;
- background-position: 0 0;
- }
- .editor .writely-comment-orange {
- background-color: #FFDEAD;
- background-position: -80px 0;
- }
- .editor .writely-comment-orange-hover {
- background-color: #F90;
- background-position: -64px 0;
- }
- .editor .writely-comment-green {
- background-color: #99FBB3;
- background-position: -48px 0;
- }
- .editor .writely-comment-green-hover {
- background-color: #00F442;
- background-position: -32px 0;
- }
- .editor .writely-comment-cyan {
- background-color: #CFF;
- background-position: -208px 0;
- }
- .editor .writely-comment-cyan-hover {
- background-color: #0FF;
- background-position: -192px 0;
- }
- .editor .writely-comment-purple {
- background-color: #EBCCFF;
- background-position: -144px 0;
- }
- .editor .writely-comment-purple-hover {
- background-color: #90F;
- background-position: -128px 0;
- }
- .editor .writely-comment-magenta {
- background-color: #FCF;
- background-position: -112px 0;
- }
- .editor .writely-comment-magenta-hover {
- background-color: #F0F;
- background-position: -96px 0;
- }
- .editor .writely-comment-red {
- background-color: #FFCACA;
- background-position: -176px 0;
- }
- .editor .writely-comment-red-hover {
- background-color: #FF7A7A;
- background-position: -160px 0;
- }
-
- .editor .writely-comment-marker {
- background-image: url('MISSING');
- background-color: transparent;
- padding-right: 11px;
- background-repeat: no-repeat;
- width: 16px;
- height: 16px;
- -moz-user-select: none;
- }
-
- .editor .writely-comment-hidden {
- padding: 0;
- background: none;
- }
- .editor .writely-comment-marker-hidden {
- background: none;
- padding: 0;
- width: 0;
- }
- .editor .writely-comment-none {
- opacity: .2;
- filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20);
- -moz-opacity: .2;
- }
- .editor .writely-comment-none-hover {
- opacity: .2;
- filter:progid:DXImageTransform.Microsoft.Alpha(opacity=20);
- -moz-opacity: .2;
- }
-
-
-
-
- .br_fix span+br:not(:-moz-last-node) {
-
- position:relative;
-
- left: -1ex
-
- }
-
-
- #cb-p-tgt {
- font-size: 8pt;
- padding: .4em;
- background-color: #ddd;
- color: #333;
- }
- #cb-p-tgt-can {
- text-decoration: underline;
- color: #36c;
- font-weight: bold;
- margin-left: 2em;
- }
- #cb-p-tgt .spin {
- width: 16px;
- height: 16px;
- background: url(//
ssl.gstatic.com/docs/clipboard/spin_16o.gif)
no-repeat;
- }
-}
-
-h6 { font-size: 8pt }
-h5 { font-size: 8pt }
-h4 { font-size: 10pt }
-h3 { font-size: 12pt }
-h2 { font-size: 14pt }
-h1 { font-size: 18pt }
-
-blockquote {padding: 10px; border: 1px #DDD dashed }
-
-.webkit-indent-blockquote { border: none; }
-
-a img {border: 0}
-
-.pb {
- border-width: 0;
- page-break-after: always;
- /* We don't want this to be resizeable, so enforce a width and height
- using !important */
- height: 1px !important;
- width: 100% !important;
-}
-
-.editor .pb {
- border-top: 1px dashed #C0C0C0;
- border-bottom: 1px dashed #C0C0C0;
-}
-
-div.google_header, div.google_footer {
- position: relative;
- margin-top: 1em;
- margin-bottom: 1em;
-}
-
-
-/* Table of contents */
-.editor div.writely-toc {
- background-color: #f3f3f3;
- border: 1px solid #ccc;
-}
-.writely-toc > ol {
- padding-left: 3em;
- font-weight: bold;
-}
-ol.writely-toc-subheading {
- padding-left: 1em;
- font-weight: normal;
-}
-/* IE6 only */
-* html writely-toc ol {
- list-style-position: inside;
-}
-.writely-toc-none {
- list-style-type: none;
-}
-.writely-toc-decimal {
- list-style-type: decimal;
-}
-.writely-toc-upper-alpha {
- list-style-type: upper-alpha;
-}
-.writely-toc-lower-alpha {
- list-style-type: lower-alpha;
-}
-.writely-toc-upper-roman {
- list-style-type: upper-roman;
-}
-.writely-toc-lower-roman {
- list-style-type: lower-roman;
-}
-.writely-toc-disc {
- list-style-type: disc;
-}
-
-/* Ordered lists converted to numbered lists can preserve ordered types,
and
- vice versa. This is confusing, so disallow it */
-ul[type="i"], ul[type="I"], ul[type="1"], ul[type="a"], ul[type="A"] {
- list-style-type: disc;
-}
-
-ol[type="disc"], ol[type="circle"], ol[type="square"] {
- list-style-type: decimal;
-}
-
-/* end default css */
-
-
- /* default print css */
-
- @media print {
- body {
- padding: 0;
- margin: 0;
- }
-
- div.google_header, div.google_footer {
- display: block;
- min-height: 0;
- border: none;
- }
-
- div.google_header {
- flow: static(header);
- }
-
- /* used to insert page numbers */
- div.google_header::before, div.google_footer::before {
- position: absolute;
- top: 0;
- }
-
- div.google_footer {
- flow: static(footer);
- }
-
- /* always consider this element at the start of the doc */
- div#google_footer {
- flow: static(footer, start);
- }
-
- span.google_pagenumber {
- content: counter(page);
- }
-
- span.google_pagecount {
- content: counter(pages);
- }
-
-
- callout.google_footnote {
-
- display: prince-footnote;
- footnote-style-position: inside;
- /* These styles keep the footnote from taking on the style of the
text
- surrounding the footnote marker. They can be overridden in the
- document CSS. */
- color: #000;
- font-family: Times New Roman;
- font-size: 12.0pt;
- font-weight: normal;
- }
-
- /* Table of contents */
- #WritelyTableOfContents a::after {
- content: leader('.') target-counter(attr(href), page);
- }
-
- #WritelyTableOfContents a {
- text-decoration: none;
- color: black;
- }
- }
-
- @page {
- @top {
- content: flow(header);
- }
- @bottom {
- content: flow(footer);
- }
- @footnotes {
- border-top: solid black thin;
- padding-top: 8pt;
- }
- }
- /* end default print css */
-
-
-/* custom css */
-
-
-/* end custom css */
-
-/* ui edited css */
-
-body {
- font-family: Times New Roman;
-
- font-size: 12.0pt;
- line-height: normal;
- background-color: #ffffff;
-}
-/* end ui edited css */
-
-
-/* editor CSS */
-.editor a:visited {color: #551A8B}
-.editor table.zeroBorder {border: 1px dotted gray}
-.editor table.zeroBorder td {border: 1px dotted gray}
-.editor table.zeroBorder th {border: 1px dotted gray}
-
-
-.editor div.google_header, .editor div.google_footer {
- border: 2px #DDDDDD dashed;
- position: static;
- width: 100%;
- min-height: 2em;
-}
-
-.editor .misspell {background-color: yellow}
-
-.editor .writely-comment {
- font-size: 9pt;
- line-height: 1.4;
- padding: 1px;
- border: 1px dashed #C0C0C0
-}
-
-
-/* end editor CSS */
-
-</style>
-
-
- <title>Readme</title>
-
-</head>
-
-<body
-
- >
-
-
-
-<p class=western>
- [BTS] The History of Three Kingdoms Release 2.4---Nine Transformation
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
-</p>
-<div>
-</div>
-<div>
- <p class=western style=" MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- Compatible with BtS 3.19
- </p>
- <p class=western style=" MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- MultiPlayer Compatible
- </p>
-</div>
-<p>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- INSTALLATION:
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- 1. Delete old version.
-</p>
-<p class=western>
- 2. Run the installer.
-</p>
-<p class=western>
- 3. Install Official Music Pack. Unzip the downloaded zip file, copy
the 'Assets' folder into your Beyond the Sword\Mods\The History of Three
Kingdoms folder, overwrite existing files. This is a must unless you prefer
mute game.
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- ABOUT THE MOD:
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- This Mod is a historically based fan Mod that covers the time of Three
Kingdoms period of China (184 AD – 280 AD). Wiki link: <font
color=#0000ff><u><a
href=
http://en.wikipedia.org/wiki/Three_Kingdoms>
http://en.wikipedia.org/wiki/Three_Kingdoms</a></u></font>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- Although relatively short, this historical period has been greatly
romanticised in the cultures of China, Japan, Korea, and Vietnam. It has
been celebrated and popularised in operas, folk stories, novels and in more
recent times, films, television serials, and video games such as <i>Dynasty
Warriors</i> series.
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- The best known of these is undoubtedly the Romance of the Three
Kingdoms, a fictional account of the period which draws heavily on history.
English Version: <font color=#0000ff><u><a
href=
http://threekingdoms.com/>
http://threekingdoms.com/</a></u></font>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- <b><font class=Apple-style-span color=#FF0000><u><font size=4>What's new
in Release 2.4---Nine Transformation?</font></u></font></b>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- <u><i>Random Hero</i></u>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
-</p>
-<div>
- Besides historical heroes that are always available for recruitment,
when player has accumulates enough combat experience and a screen pop up
asking player to choose a hero to recruit for half price, the player can
choose not to recruit existing heroes, but to promote a complete new
random-generated hero from the veteran soldiers of the faction. Choosing to
promote a new random hero cost no money.
-</div>
-<div>
- <br>
-</div>
-<div>
- A new random hero has a random name, a random portrait that's different
from all existing heroes' portraits, a random belief, and random loyalties
to each factions. His loyalty to it's creating faction is usually high. He
will also have random starting and potential unit combat levels. He will
start with no more than 3 starting promotions. He even has a really small
chance to be a nine transformation hero.
-</div>
-<div>
- <br>
-</div>
-<div>
- The real fun for random heroes come from two part. First one is, unlike
historical heroes, a random hero's potential unit combat level is hidden.
In civilopedia or hero advisor, his potential unit combat levels are shown
as '?', unless his current unit combat level is already equal to potential
unit combat level. So player don't really know which unit combat type has
the most potential, and how big that potential is. Second one is, a random
hero will start with zero potential promotions. However, upon each level up
until level 11, he will gain 2 more random promotions as potential
promotion. He can then choose from these potential promotions when level
up. Those potential promotions not chosen will accumulate to next time when
hero levels up. So he can turn out to be a powerful hero, is everything
goes right.
-</div>
-<div>
- <br>
-</div>
-<div>
- <u><i>Dynamic Initial Unit</i></u>
-</div>
-<div>
- <br>
-</div>
-<div>
- <div>
- For HoTK Scenarios, we always wanted to achieve one goal: the accurate
simulation of history. The simulation is far from perfection, for two
reasons. The first is the limitation of AI, the second is at the same time
we want to provide enough challenge for players, so we can't make the
historical winners too powerful. The conflict between accurate simulation
of history and player challenge will be solved by introducing a mechanic
called Dynamic Initial Unit.
- </div>
- <div>
- <br>
- </div>
- <div>
- In each scenario, every faction has a variable which determines
whether that faction subjects to initial unit change. If the faction
subjects to initial unit change, then when the faction is chosen by human
player, the faction's initial unit will change according to the difficulty
level human player chooses. If the difficulty level is equal to or below
noble, then no changes will apply. If the difficulty level is above noble,
then each of the faction's original initial unit will have a chance to be
killed upon game initialization. The higher the difficulty level, the
higher the chance of killing an initial unit will be.
- </div>
- <div>
- <br>
- </div>
- <div>
- Besides, if a faction subjects to initial unit change, then the
faction can define several other factions as AI target faction. Faction 1's
AI target faction is a faction whose initial unit will have a chance to
duplicate itself when faction 1 is controlled by human player. The chance
and times of unit duplication varies with faction 1 (the human player)'s
difficulty level. If difficulty level is equal to or below noble, then no
unit duplication will apply. If difficulty level is above noble, then the
duplication chance and times will increase with difficulty level.
- </div>
- <div>
- <br>
- </div>
- <div>
- <u><i>Nine Transformation</i></u>
- </div>
- <div>
- <br>
- </div>
- <div>
- <div>
- Some of the historical heroes in the game possess a special ability
called 'Nine Transformation'. This is an ability that allows the hero to
choose and active the one best suited promotion among a maximum of nine
promotions each turn, thus providing a wider strategic space. Heroes who
possess this ability will start with one randomly chosen promotion in his
nine transformation promotion pool at level 1, and then upon each level up,
he will gain another randomly chosen promotion, adding to his own nine
transformation promotion pool. He can gain a maximum of nine promotions in
this way. The promotions that can be gained in this way will not overlap
with promotions that the hero can normally gain through level up.
- </div>
- <div>
- <br>
- </div>
- </div>
- <div>
- <u><i>New Heroes, Promotions and Scenario</i></u>
- </div>
- <div>
- <br>
- </div>
- <div>
- In this update we introduced 13 new heroes, including the most famous
warlord Cao Cao, 9 new promotions and 1 new scenario: 194AD on 68 * 64 map.
- </div>
- <div>
- <br>
- </div>
- <div>
- <p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <u><i>Double the Speed</i></u>
- </p>
- <p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
- </p>
- <p class=western style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- In a word, the Mod runs at least two times faster than previous
release. One of HoTK's scenario, 196AD 68*64, it's speed is a little faster
than BTS's AD1000 scenario for the first 90 turns. And because HoTK's
scenario will not increase its city number over time, it will be
significantly faster than BTS's AD1000 in middle and late game. If you want
to know why, check out the faq here: <a
href=
http://forums.civfanatics.com/showthread.php?t=304872 id=zoh:
style=COLOR:#551a8b
title=
http://forums.civfanatics.com/showthread.php?t=304872>
http://forums.civfanatics.com/showthread.php?t=304872</a>
- </p>
- </div>
-</div>
-<div>
- <br>
-</div>
-<p>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <b><font class=Apple-style-span color=#FF0000><u>FEATURES for Release
2:</u></font></b>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <u><i>Introducing Combat Heroes</i></u>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- Combat Heroes are units who contribute to warfare by attaching to unit
and form a multi-units legion.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- A Combat Hero has the following stats: Unit Combat Level (melee,
mounted, archer, siege and naval), which determines how many units his
legion can hold and how strong they would be; Promotions, which are unique
to heroes, are given freely to members upon forming legion, can be gained
when the hero levels up; Experience, which is gained automatically when his
legion members gain experience.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- A Combat Hero is either given for free in the start of the game, or
recruited with gold over time. As shown in the screen, there are multiple
factors that influence the cost of recruitment.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- When a hero is attacked, or the unit the hero attached to is defeated,
the hero can have a chance to escape, or surrender, or die, the last of
which can be disabled as a Game Option.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <u><i>Introducing Legions</i></u>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- When a Combat Hero is on the same plot with own combat units, he can
perform Form Legion Mission, which will bring up a new screen:
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- A Legion should consists of units of the same UnitCombat Type. A Legion
cannot hold units more than the hero's related Unit Combat Level, for
example, Guan Yu is Level A for Melee Units, so his legion of Melee units
has a maximum size of 4. Upon forming a legion, the member will be given a
unit combat promotion corresponding to his hero's unit combat level.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- A legion Member is either a core troop, to whom the hero attaches to, or
a plain members. All members can receive Member Promotions the hero has
gained, but only the core troop can receive the hero's Unique Promotion.
More on promotions later.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- A legion can be regrouped or dismissed. When a legion is empty, the hero
will be automatically recreated. A unit can also perform action such as
Join Legion and Quit Legion. A "warlord" unit, which is now
called 'champions', can join a legion but cannot act as core troop.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <u><i>New Promotions---New Interactivity</i></u>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- There are 80+ new promotions in this release. Half among them are
uniquely interesting as they allow players to do things that are never
possible before. Promotions are now classified into two part: promotions
for normal units, and promotions for heroes, and can be further divided
into 5 sub-classes:
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 1. Single Unit Promotions: all the BTS traditional promotions plus a few
more we have introduced in Release 1
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 2. Unit Combat Promotions: these promotions cannot be learned either by
units or by heroes. Rather, they are automatically distributed for free
when a unit joins a legion. For example, our hero, Guan Yu, is level 4 for
Melee Unit Combat, then when a Melee unit joins his legion, the unit will
automatically gain Promotion Melee IV
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 3. Combat Level Promotions: heroes can choose these promotions to
further increase their respective unit combat level. These promotions can
be repetitively learned, but a hero's unit combat level cannot exceeds his
predefined maximum level.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 4. Unique Promotions: These promotions can only be chosen by heroes, and
are passed to and only to the unit a hero attached to when forming a legion.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 5. Member Promotions: These promotions can only be chosen by heroes too,
but are passed to the all members of the legion when it is formed.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- Note that whenever a legion is regrouped, or the hero gains new
promotion, all the members of the legion will update their promotions
accordingly.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <u><i>AI Knows How</i></u>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- The AI knows how to use the hero:
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 1. They know how to accumulate money and spend them recruiting heroes,
but they can restrain themselves.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 2. They know how to move heroes at different situations, to aid
invasion, defend homeland as well as hunting barbarian.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 3. They know how and when to form a legion, to choose the best core
troop and legion members.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 4. They know how and when to regroup legion, in order to bring in fresh
blood or change to a better core troop.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 5. They know how and when to dismiss legion when the grand situation
changes.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 6. They know how to level heroes up, and how to choose the best
promotions for them.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- The AI is also improved in several aspects comparing to the previous
release:
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 1. AI will refuse to become a vassal if the two team are not direct
neighbors. A team with emperor or Yuan Shao are not limited by this rule.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 2. AI is more likely to choose a city with emperor in it as a target
city in war.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 3. AI thinks declaring war on an Emperor Team is more profitable now. At
the same time, the AI also thinks an emperor team is more powerful, which
in turn reduces the chance of weaker AI declaring war on Emperor team.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 4. AI will consider their Civilization Trait when deciding whether
to go for a Cultural Victory
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 5. Better BTS AI is updated from 0.45 to 0.60, numerous great changes
are included, just pick an easy one here: AI now will improve bonuses in
lakes
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <u><i>Revamped Interface</i></u>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- To help players with the newly added legion system, lots of interface
changes are implemented. First, there's a hero panel on the top left of the
main interface, which shows all the heroes the current player controls;
when clicking on a hero's portrait, the camera will go to the hero himself
or cycle through his legion members
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- Second, on the bottom left of the main interface, each legion unit also
displays it's Hero's stats and Legion Member Status. On plot list a core
troop is denoted with a star, while champions (former warlords) are denoted
with a shield. When you mouse over a Hero, you'll see his unit Combat
Levels and promotions too. There's also a new action called Go To Legion
that allows to group select all units of same legion on the plot.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- Third, in Military Advisor, you could choose to display the Heroes and
their Legion Members on the mini map, for fast look up.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- Fourth, in the newly added Hero Advisor, apart from the recruitment
screen, there's also a screen called Info, which displays a hero's current
UnitCombat Level, promotions, legion members, and XP.
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <u><i>More Maps and Scenarios</i></u>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- We have added more maps and scenarios in Release 2. Here is a complete
list including both Release 1 and Release 2:
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- <br>
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 1. HoTK 51_51, 196AD scenario
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 2. HoTK 51_51, 196AD starting location, no City
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 3. HoTK 68_64, 196AD scenario
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 4. HoTK 68_64, 196AD starting location, no City
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 5. HoTK 81_81, 196AD scenario
-</p>
-<p style="MARGIN-RIGHT:0px; MARGIN-LEFT:0px">
- 6. HoTK 81_81, 196AD starting location, no City
-</p>
-<p>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- <b><font class=Apple-style-span color=#FF0000><u>FEATURES for Release
1:</u></font></b>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- <u><i> New Civilizations with Unique Civilization Trait </i></u>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- Civilizations in the mod are the major military and political factions
ever appeared during the Three kingdoms Period of China. Apart from the
Unique Units, Buildings and leaders, each Civilization has their own
Civilization Trait specifically designed for them, drawing inspiration from
their historical reputation and behavior.
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- <u><i>All New Leaders and Leader Trait</i></u>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- Some Leaders, namely those most famous men of the period, has three
leader traits, one of which is specifically designed for them according to
their personality.
-</p>
-<p class=western>
-</p>
-<div id=xcxo style=TEXT-ALIGN:left>
- Brand New tech tree
-</div>
-<p class=western>
- The tech tree is completed redesigned, with about the same number of
techs comparing to original BTS version. All technologies are drawn from
Three Kingdoms period of Chinese History, each with their complete pedia
entries.
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- <u><i> Brand New Civics </i></u>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- A total of 18 civics in the mod, all of which are historically
based.
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- <u><i> All New Units </i></u>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- Units are completed redone with proper new models and buttons.
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- <u><i> All New wonders and Building </i></u>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- All wonders and buildings are new and historically accurate. There is
one kind of special World Wonders that is worth mentioning: the Special
City Wonder. With a total number of 8, these Wonders are prosperous Cities
of ancient China. These wonders are powerful and fun, and all of them
requires some special conditions to be met before a player can build them,
such as another wonder built in the city, has a certain number of settled
great people in the city, or has control over several resources. Also, when
built, the hosting city will automatically change its name according the
the name of the City Wonder.
-</p>
-<p class=western>
-</p>
-<div id=pxmq style=TEXT-ALIGN:left>
- New Beliefs System and 'Religion Buildings'
-</div>
-<p class=western>
- Religions are now substituted by Beliefs in the mod. Each Leader has a
favorite Belief which will deeply influence their decisions and behaviors
in the game. The 'Religion Buildings' in the original game are also
substituted by new 'Government Buildings', which are also unique to each of
the seven Belief Types. A player can only build the corresponding
Government Building of the same type with their State Belief. Or if the
player don't have a State Belief, they could still build a 'chaos' type of
the Government Building provided all other prerequisites are met. When
Player Changes his State Belief, the Government Buildings in the player's
cities will also simultaneously change to corresponding type. Besides all
these changes, missionaries spreading Beliefs in other player's cities will
also bring some own culture to the target city and espionage points toward
the player.<br>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- <u><i>Emperor System</i></u><br>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- Controlling the emperor is of vital political importance during Three
Kingdoms Period of China. The same thing is also true in the Game. During
each game, a Emperor's Refugee will randomly appear on the map in the
beginning of the game, and will be guarded by a Barbarian unit called 'The
Rogue of the White Wave'. If a player kills the Rogue, he will capture the
Emperor, which could be settled into a city as a Emperor Specialist.
Settling down the Emperor will instantly make the target city the player's
capital. The Emperor Specialist has many effects, including, but not
restricted to, increasing great people birth rate in the city, making the
player's trade proposal worth more in other player's eyes, making other
player more prone to your persuasion for war, drastically changing the
attitude other player has for you, as well as enable a building called
Imperial Court, which will trigger diplomatic votes and make the building
player the chancellor. However, if other player captures the city where the
Emperor Specialist resides, the Emperor will change hand and be controlled
by the other player. This will destroy the Imperial Court previously Built
and stops the Diplomatic Vote until the other player settles the Emperor
and rebuild the Imperial Court. The Team who controls the Emperor will be
noted with a Golden Star on the Scoreboard to the bottom-right of the main
interface.
-</p>
-<div id=tq1i style=TEXT-ALIGN:left>
- Enhanced Diplomacy
-</div>
-<div id=t8t2 style=TEXT-ALIGN:left>
- Diplomacy has been greatly enhanced in the game. A few new diplomatic
relationship modifier has been introduced in the game, including sharing
the same worst enemy, sharing the same powerful and dangerous enemy,
controlling the holy city of the same state belief, controlling the
emperor, controlling the emperor while adopting the Belief Revival,
controlling the emperor while adopting some 'Bad' Belief. In general,
attitude changes induced by Belief (religion) has been weakened, except for
some very strong-headed leader. These are the apparent changes. Also there
are changes behind the curtain. Several hidden attitude modifier has also
been introduced to make the game more challenging and realistic. Leaders
will now has attitude modifier toward the top ranking player, toward the
player whose ranking are similar the their own, and toward the leaders who
in History has some particular things to do with themselves, such as blood
feud, fierce rivalry, or loyal friendship. After a player settles the
Emperor and builds the Imperial Court, diplomatic voting is triggered.
Among some familiar proposal, a new one called 'Demand Hostage' is
included. This new proposal will ask a peaceful vassal team to submit
hostage to their master team, thus making the peaceful vassal capitulate
and unable to break away per their own wish. A new variable is also
introduced in the diplomatic voting system. The player's total vote ability
is no longer the sole function of the player's economic prowess. The
politics of Imperial Court has joined the game. When a player votes Yes to
a proposal which eventually got passed, his voting power will increase by
10%, and when a player votes No to the same proposal, his voting power will
decrease by 10%. And Vice Versa. If a player defies a resolution, his
voting power will decrease by 20%. If a player abstains, his voting power
will stay the same. The voting power change limit in this way is -100% to
100%.
-</div>
-<div id=ovql style=TEXT-ALIGN:left>
- Map of China and Scenarios
-</div>
-<div id=iw3g style=TEXT-ALIGN:left>
- Included with the mod are two Maps of China. The first one, named Sanguo
81_81, is a map in which all players start from settlers and warriors, and
are placed according to their historical starting position in the year
196AD. The second one, named Sanguo 68_64, is a map where all players have
their real historical cities, units and war relationships already done for
them according to the historical situation of 196AD in China.
-</div>
-<p>
- <br>
-</p>
-<p class=western>
- <font class=Apple-style-span color=#FF0000><u> INCLUDED MODS: </u></font>
-</p>
-<p class=western>
- <br>
-</p>
-<p class=western>
- Better AI 0.80
-</p>
-<p class=western>
- BUG MOD 3.6
-</p>
***The diff for this file has been truncated for email.***
=======================================
--- /trunk/The History of Three
Kingdoms/Assets/Python/Contrib/CvOverlayScreenUtils.py Tue Aug 25 06:46:25
2009
+++ /trunk/The History of Three
Kingdoms/Assets/Python/Contrib/CvOverlayScreenUtils.py Tue Sep 29 23:51:43
2009
@@ -26,6 +26,13 @@
#GROUP_SIGNTXT = 0
overlayScreen =
CvDotMapOverlayScreen.CvDotMapOverlayScreen(STRATEGY_OVERLAY_SCREEN)
+
+#### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+import CvTutorialAdvisorScreen
+tutorialAdvisorScreen = CvTutorialAdvisorScreen.tutorialAdvisorScreen
+TUTORIAL_ADVISOR_SCREEN_ID =
CvTutorialAdvisorScreen.TUTORIAL_ADVISOR_SCREEN_ID
+#### Sanguo Mod Tutorial, end
+
def showOverlayScreen():
"""
Shows the Overlay Screen from CvDotMapOverlayScreen.py
@@ -106,6 +113,9 @@
HandleInputMap = {
STRATEGY_OVERLAY_SCREEN : overlayScreen, # Pass off input to the overlay
screen for it to handle
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ TUTORIAL_ADVISOR_SCREEN_ID : tutorialAdvisorScreen,
+ #### Sanguo Mod Tutorial, end
}
def leftMouseDown (self, argsList):
@@ -138,6 +148,10 @@
screenEnum = argsList[0]
if (screenEnum == STRATEGY_OVERLAY_SCREEN):
overlayScreen.update(argsList)
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ elif (gc.getGame().getTutorialID() > -1 and screenEnum ==
TUTORIAL_ADVISOR_SCREEN_ID ):
+ tutorialAdvisorScreen.update(argsList[1])
+ #### Sanguo Mod Tutorial, end
return 0
def handleInput (self, argsList):
@@ -146,6 +160,12 @@
Gets the active screen from the HandleInputMap Dictionary and calls the
handle input on that screen
"""
screenEnum, inputClass = argsList
+
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() == -1 and screenEnum ==
TUTORIAL_ADVISOR_SCREEN_ID ):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
if (self.HandleInputMap and inputClass and
self.HandleInputMap.has_key(screenEnum)):
# get the screen that is active from the HandleInputMap Dictionary
screen = self.HandleInputMap.get( inputClass.getPythonFile() )
=======================================
--- /trunk/The History of Three
Kingdoms/Assets/Python/Contrib/Sevopedia/SevoPediaCivilization.py Fri Jul
31 06:20:39 2009
+++ /trunk/The History of Three
Kingdoms/Assets/Python/Contrib/Sevopedia/SevoPediaCivilization.py Tue Sep
29 23:51:43 2009
@@ -129,7 +129,11 @@
panelName = self.top.getNextWidgetName()
screen.addPanel(panelName, localText.getText("TXT_KEY_CONCEPT_LEADERS",
()), "", False, True, self.X_LEADER, self.Y_LEADER, self.W_LEADER,
self.H_LEADER, PanelStyles.PANEL_STYLE_BLUE50)
screen.attachLabel(panelName, "", " ")
- for iLeader in range(gc.getNumLeaderHeadInfos()):
+
+ #### Sanguo Mod Random Leader, start, by poyuzhe 09.30.09
+## for iLeader in range(gc.getNumLeaderHeadInfos()):
+ for iLeader in range(gc.getNumLeaderHeadInfos() +
gc.getNumRandomLeaderInfos()):
+ #### Sanguo Mod random leader, end
civ = gc.getCivilizationInfo(self.iCivilization)
if civ.isLeaders(iLeader):
screen.attachImageButton(panelName, "",
gc.getLeaderHeadInfo(iLeader).getButton(),
GenericButtonSizes.BUTTON_SIZE_CUSTOM,
WidgetTypes.WIDGET_PEDIA_JUMP_TO_LEADER, iLeader, self.iCivilization, False)
=======================================
--- /trunk/The History of Three
Kingdoms/Assets/Python/Contrib/Sevopedia/SevoPediaHero.py Fri Sep 18
07:27:23 2009
+++ /trunk/The History of Three
Kingdoms/Assets/Python/Contrib/Sevopedia/SevoPediaHero.py Tue Sep 29
23:51:43 2009
@@ -141,8 +141,9 @@
panelName = self.top.getNextWidgetName()
screen.addPanel(panelName, localText.getText("TXT_KEY_PEDIA_STATS",
()), "", False, True, self.X_STATS_PANE, self.Y_STATS_PANE,
self.W_STATS_PANE, self.H_STATS_PANE, PanelStyles.PANEL_STYLE_BLUE50)
screen.attachLabel(panelName, "", " ")
- screen.setTextAt(self.top.getNextWidgetName(), panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_LEADERSHIP",
(gc.getHeroInfo(self.iHero).getLeadership(), )),
CvUtil.FONT_CENTER_JUSTIFY, 5, 15, 0, FontTypes.GAME_FONT,
WidgetTypes.WIDGET_GENERAL, -1, -1)
- screen.setTextAt(self.top.getNextWidgetName(), panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_MIGHT",
(gc.getHeroInfo(self.iHero).getMight(), )), CvUtil.FONT_CENTER_JUSTIFY, 5,
35, 0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
+ screen.setTextAt(self.top.getNextWidgetName(), panelName,
localText.changeTextColor(gc.getHeroInfo(self.iHero).getDescription(),
gc.getInfoTypeForString("COLOR_HIGHLIGHT_TEXT")),
CvUtil.FONT_CENTER_JUSTIFY, 5, 5, 0, FontTypes.GAME_FONT,
WidgetTypes.WIDGET_GENERAL, -1, -1)
+ screen.setTextAt(self.top.getNextWidgetName(), panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_LEADERSHIP",
(gc.getHeroInfo(self.iHero).getLeadership(), )),
CvUtil.FONT_CENTER_JUSTIFY, 5, 25, 0, FontTypes.GAME_FONT,
WidgetTypes.WIDGET_GENERAL, -1, -1)
+ screen.setTextAt(self.top.getNextWidgetName(), panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_MIGHT",
(gc.getHeroInfo(self.iHero).getMight(), )), CvUtil.FONT_CENTER_JUSTIFY, 5,
45, 0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
# Historical Civilizations
panelName = self.top.getNextWidgetName()
=======================================
--- /trunk/The History of Three
Kingdoms/Assets/Python/Contrib/Sevopedia/SevoPediaMain.py Thu Sep 24
10:17:15 2009
+++ /trunk/The History of Three
Kingdoms/Assets/Python/Contrib/Sevopedia/SevoPediaMain.py Tue Sep 29
23:51:43 2009
@@ -604,7 +604,10 @@
self.placeItems(WidgetTypes.WIDGET_PEDIA_JUMP_TO_LEADER,
gc.getLeaderHeadInfo)
def getLeaderList(self):
- return self.getSortedList(gc.getNumLeaderHeadInfos(),
gc.getLeaderHeadInfo)
+ #### Sanguo Mod Random Leader, start, by poyuzhe 09.30.09
+## return self.getSortedList(gc.getNumLeaderHeadInfos(),
gc.getLeaderHeadInfo)
+ return self.getSortedList(gc.getNumLeaderHeadInfos() +
gc.getNumRandomLeaderInfos(), gc.getLeaderHeadInfo)
+ #### Sanguo Mod Random Leader, end
def placeTraits(self):
@@ -943,7 +946,13 @@
continue
elif getInfo == 0:
if not item.isHero():
+ continue
+ elif getInfo == gc.getCivilizationInfo:
+ if not item.isPlayable() and not
item.isAIPlayable():
continue
+ elif getInfo == gc.getLeaderHeadInfo:
+ if item.getType() == "LEADER_BARBARIAN":
+ continue
if item:
list.append((item.getDescription(), i))
if self.isSortLists() and not noSort:
=======================================
--- /trunk/The History of Three Kingdoms/Assets/Python/CvEventManager.py
Sun Jun 28 06:56:22 2009
+++ /trunk/The History of Three Kingdoms/Assets/Python/CvEventManager.py
Tue Sep 29 23:51:43 2009
@@ -298,6 +298,11 @@
def onUpdate(self, argsList):
'Called every frame'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
fDeltaTime = argsList[0]
# allow camera to be updated
@@ -325,6 +330,11 @@
def onGameStart(self, argsList):
'Called at the start of the game'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
if (gc.getGame().getGameTurnYear() == gc.getDefineINT("START_YEAR") and
not gc.getGame().isOption(GameOptionTypes.GAMEOPTION_ADVANCED_START)):
for iPlayer in range(gc.getMAX_PLAYERS()):
player = gc.getPlayer(iPlayer)
@@ -354,6 +364,11 @@
def onBeginGameTurn(self, argsList):
'Called at the beginning of the end of each turn'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
iGameTurn = argsList[0]
CvTopCivs.CvTopCivs().turnChecker(iGameTurn)
@@ -384,6 +399,11 @@
def onFirstContact(self, argsList):
'Contact'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
iTeamX,iHasMetTeamY = argsList
if (not self.__LOG_CONTACT):
return
@@ -391,6 +411,11 @@
def onCombatResult(self, argsList):
'Combat Result'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
pWinner,pLoser = argsList
playerX = PyPlayer(pWinner.getOwner())
unitX = PyInfo.UnitInfo(pWinner.getUnitType())
@@ -448,6 +473,11 @@
def onImprovementBuilt(self, argsList):
'Improvement Built'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
iImprovement, iX, iY = argsList
if (not self.__LOG_IMPROVEMENT):
return
@@ -464,6 +494,11 @@
def onRouteBuilt(self, argsList):
'Route Built'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
iRoute, iX, iY = argsList
if (not self.__LOG_IMPROVEMENT):
return
@@ -499,6 +534,11 @@
def onBuildingBuilt(self, argsList):
'Building Completed'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
pCity, iBuildingType = argsList
game = gc.getGame()
if ((not gc.getGame().isNetworkMultiPlayer()) and (pCity.getOwner() ==
gc.getGame().getActivePlayer()) and
isWorldWonderClass(gc.getBuildingInfo(iBuildingType).getBuildingClassType())):
@@ -545,6 +585,11 @@
def onUnitMove(self, argsList):
'unit move'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
pPlot,pUnit,pOldPlot = argsList
player = PyPlayer(pUnit.getOwner())
unitInfo = PyInfo.UnitInfo(pUnit.getUnitType())
@@ -565,6 +610,11 @@
def onUnitCreated(self, argsList):
'Unit Completed'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
unit = argsList[0]
player = PyPlayer(unit.getOwner())
if (not self.__LOG_UNITBUILD):
@@ -604,6 +654,11 @@
def onUnitPromoted(self, argsList):
'Unit Promoted'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
pUnit, iPromotion = argsList
player = PyPlayer(pUnit.getOwner())
if (not self.__LOG_UNITPROMOTED):
@@ -612,6 +667,11 @@
def onUnitSelected(self, argsList):
'Unit Selected'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
unit = argsList[0]
player = PyPlayer(unit.getOwner())
if (not self.__LOG_UNITSELECTED):
@@ -673,6 +733,11 @@
def onTechAcquired(self, argsList):
'Tech Acquired'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
iTechType, iTeam, iPlayer, bAnnounce = argsList
# Note that iPlayer may be NULL (-1) and not a refer to a player object
@@ -693,6 +758,11 @@
def onTechSelected(self, argsList):
'Tech Selected'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
iTechType, iPlayer = argsList
if (not self.__LOG_TECH):
return
@@ -700,6 +770,11 @@
def onReligionFounded(self, argsList):
'Religion Founded'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
iReligion, iFounder = argsList
player = PyPlayer(iFounder)
@@ -817,6 +892,11 @@
def onCityBuilt(self, argsList):
'City Built'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
city = argsList[0]
if (city.getOwner() == gc.getGame().getActivePlayer()):
self.__eventEditCityNameBegin(city, False)
@@ -879,6 +959,11 @@
def onCityBuildingUnit(self, argsList):
'City begins building a unit'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
pCity = argsList[0]
iUnitType = argsList[1]
if (not self.__LOG_CITYBUILDING):
@@ -887,6 +972,11 @@
def onCityBuildingBuilding(self, argsList):
'City begins building a Building'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
pCity = argsList[0]
iBuildingType = argsList[1]
if (not self.__LOG_CITYBUILDING):
@@ -930,6 +1020,11 @@
def onMouseEvent(self, argsList):
'mouse handler - returns 1 if the event was consumed'
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() != -1):
+ return 0
+ #### Sanguo Mod Tutorial, end
+
eventType,mx,my,px,py,interfaceConsumed,screens = argsList
if ( px!=-1 and py!=-1 ):
if ( eventType == self.EventLButtonDown ):
=======================================
--- /trunk/The History of Three Kingdoms/Assets/Python/CvGameUtils.py Tue
Aug 11 09:33:16 2009
+++ /trunk/The History of Three Kingdoms/Assets/Python/CvGameUtils.py Tue
Sep 29 23:51:43 2009
@@ -4,8 +4,11 @@
## Implementaion of miscellaneous game functions
import CvUtil
+import Tutorial
+import CvTutorialAdvisorScreen
from CvPythonExtensions import *
import CvEventInterface
+import BugUtil
# globals
gc = CyGlobalContext()
@@ -13,9 +16,16 @@
class CvGameUtils:
"Miscellaneous game functions"
def __init__(self):
- pass
+ self.tutorial = Tutorial.tutorial
+ self.screen = CvTutorialAdvisorScreen.tutorialAdvisorScreen
def isVictoryTest(self):
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ if self.tutorial.bIsVictoryTest:
+ return self.parent.isVictoryTest()
+ return False
+ #### Sanguo Mod Tutorial, end
if ( gc.getGame().getElapsedGameTurns() > 10 ):
return True
else:
@@ -27,6 +37,10 @@
def isPlayerResearch(self, argsList):
ePlayer = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bIsPlayerResearch
+ #### Sanguo Mod Tutorial, end
return True
def getExtraCost(self, argsList):
@@ -34,26 +48,50 @@
return 0
def createBarbarianCities(self):
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bCreateBarbarianCities
+ #### Sanguo Mod Tutorial, end
return False
def createBarbarianUnits(self):
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bCreateBarbarianUnits
+ #### Sanguo Mod Tutorial, end
return False
def skipResearchPopup(self,argsList):
ePlayer = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bSkipResearchPopup
+ #### Sanguo Mod Tutorial, end
return False
def showTechChooserButton(self,argsList):
ePlayer = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bShowTechChooserButton
+ #### Sanguo Mod Tutorial, end
return True
def getFirstRecommendedTech(self,argsList):
ePlayer = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.iGetFirstRecommendedTech
+ #### Sanguo Mod Tutorial, end
return TechTypes.NO_TECH
def getSecondRecommendedTech(self,argsList):
ePlayer = argsList[0]
eFirstTech = argsList[1]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.iGetSecondRecommendedTech
+ #### Sanguo Mod Tutorial, end
return TechTypes.NO_TECH
def canRazeCity(self,argsList):
@@ -66,26 +104,71 @@
def skipProductionPopup(self,argsList):
pCity = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bSkipProductionPopup
+ #### Sanguo Mod Tutorial, end
return False
def showExamineCityButton(self,argsList):
pCity = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bCanOpenCityScreen
+ #### Sanguo Mod Tutorial, end
return True
def getRecommendedUnit(self,argsList):
pCity = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.iGetRecommendedUnit
+ #### Sanguo Mod Tutorial, end
return UnitTypes.NO_UNIT
def getRecommendedBuilding(self,argsList):
pCity = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.iGetRecommendedBuilding
+ #### Sanguo Mod Tutorial, end
return BuildingTypes.NO_BUILDING
def updateColoredPlots(self):
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ if self.tutorial.bShowPlotIndicator:
+ self.tutorial.showIndicatorPlot()
+ return self.tutorial.bUpdateColoredPlots
+ #### Sanguo Mod Tutorial, end
return False
def isActionRecommended(self,argsList):
pUnit = argsList[0]
iAction = argsList[1]
+
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ iActionMissionType = gc.getActionInfo(iAction).getMissionType()
+ iActionCommandType = gc.getActionInfo(iAction).getCommandType()
+ iActionInterfaceModeType =
gc.getActionInfo(iAction).getInterfaceModeType()
+ iActionBuildType = gc.getActionInfo(iAction).getMissionData()
+
+ if pUnit.getScriptData() == self.tutorial.szScriptData:
+ if iActionMissionType != -1:
+ if iActionMissionType == self.tutorial.iForceActionMissionType:
+ if iActionMissionType == int ( MissionTypes.MISSION_BUILD ):
+ if self.tutorial.isNotAllowedBuildType(iActionBuildType):
+ return False
+ return True
+ if iActionCommandType != -1:
+ if iActionCommandType == self.tutorial.iForceActionCommandTypes:
+ return True
+ if iActionInterfaceModeType != -1:
+ if iActionInterfaceModeType ==
self.tutorial.iForceActionInterfaceModeTypes:
+ return True
+ #### Sanguo Mod Tutorial, end
+
return False
def unitCannotMoveInto(self,argsList):
@@ -99,6 +182,65 @@
pPlot = argsList[0]
iAction = argsList[1]
bTestVisible = argsList[2]
+
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ if bTestVisible:
+ return False
+
+ iActionMissionType = gc.getActionInfo(iAction).getMissionType()
+ iActionCommandType = gc.getActionInfo(iAction).getCommandType()
+ iActionInterfaceModeType =
gc.getActionInfo(iAction).getInterfaceModeType()
+ iActionBuildType = gc.getActionInfo(iAction).getMissionData()
+
+ if self.tutorial.bWorkerCanBuildQuarry == False:
+ if iActionMissionType == int ( MissionTypes.MISSION_BUILD ) and
iActionBuildType == CvUtil.findInfoTypeNum(gc.getBuildInfo,
gc.getNumBuildInfos(), "BUILD_QUARRY"):
+ return True
+
+ if self.tutorial.bLockFirstWarrior:
+ if CyInterface().getHeadSelectedUnit():
+ if CyInterface().getHeadSelectedUnit().getScriptData()
== "FIRST_WARRIOR":
+ return True
+
+ if iActionInterfaceModeType != -1:
+ if self.tutorial.bDisableBuildRoads:
+ if iActionInterfaceModeType ==
int(InterfaceModeTypes.INTERFACEMODE_ROUTE_TO):
+ return True
+ if CyInterface().getHeadSelectedUnit():
+ if CyInterface().getHeadSelectedUnit().getScriptData() ==
self.tutorial.szScriptData:
+ if self.tutorial.iForceActionInterfaceModeTypes ==
iActionInterfaceModeType:
+ return False
+ return True
+
+ # if self.tutorial.bCanUnitsInterfaceModeGoTo == False:
+ # if iActionInterfaceModeType ==
int(InterfaceModeTypes.INTERFACEMODE_GO_TO):
+ # if self.tutorial.iForceActionInterfaceModeTypes ==
int(InterfaceModeTypes.INTERFACEMODE_GO_TO) and
CyInterface().getHeadSelectedUnit().getScriptData() == "FIRST_SCOUT":
+ # return False
+ # return True
+ # if iActionInterfaceModeType ==
int(InterfaceModeTypes.INTERFACEMODE_GO_TO_ALL):
+ # return True
+ # if iActionInterfaceModeType ==
int(InterfaceModeTypes.INTERFACEMODE_GO_TO_TYPE):
+ # return True
+
+
+ if iActionCommandType != -1:
+ if self.tutorial.bPromoteAvailable == False and iActionCommandType ==
int(CommandTypes.COMMAND_PROMOTION):
+ return True
+ if self.tutorial.bCanDeleteUnit == False and iActionCommandType ==
int(CommandTypes.COMMAND_DELETE):
+ return True
+ if self.tutorial.bCanUnitAutomateExplore == False and
iActionCommandType == int(CommandTypes.COMMAND_AUTOMATE):
+ return True
+ return False
+
+
+
+ if iActionMissionType != -1:
+ if self.tutorial.isNotAllowActionMission(pPlot,iActionMissionType):
+ return True
+ elif iActionMissionType == int(MissionTypes.MISSION_BUILD):
+ return self.tutorial.isNotAllowedBuildType(iActionBuildType)
+ return False
+ #### Sanguo Mod Tutorial, end
return False
def canBuild(self,argsList):
@@ -114,6 +256,33 @@
bAlt = argsList[1]
bShift = argsList[2]
bCtrl = argsList[3]
+
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ BugUtil.error("cannotSelectionListMove")
+ if (gc.getGame().getTutorialID() > -1):
+ if self.tutorial.bLockFirstWarrior:
+ if CyInterface().getHeadSelectedUnit():
+ if CyInterface().getHeadSelectedUnit().getScriptData()
== "FIRST_WARRIOR":
+ return True
+
+ if self.tutorial.bGoWestNotAllowed and pPlot.getX() <= 19:
+ self.tutorial.doErrorPopup("TXT_KEY_TUTORIAL_GO_WEST_NOT_ALLOWED")
+ return True
+
+ if
self.tutorial.isNotAllowActionMission(pPlot,int(MissionTypes.MISSION_MOVE_TO)):
+ self.tutorial.doErrorPopup("TXT_KEY_TUTORIAL_ERROR_MOVE_NOT_ALLOWED")
+ return True
+ else:
+ BugUtil.error("bloody hell")
+ if CyInterface().getHeadSelectedUnit():
+ if self.tutorial.bWaitForUnitAction and
CyInterface().getHeadSelectedUnit().getScriptData() ==
self.tutorial.szScriptData:
+ BugUtil.error("Jesus Christ")
+ self.tutorial.bWaitForUnitAction = False
+ print ("doNextInfo cannotSelectionListMove1")
+ self.screen.doNextInfo()
+ return False
+ #### Sanguo Mod Tutorial, end
+
return False
def cannotSelectionListGameNetMessage(self,argsList):
@@ -124,32 +293,141 @@
iFlags = argsList[4]
bAlt = argsList[5]
bShift = argsList[6]
+
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ if self.tutorial.bLockFirstWarrior:
+ if CyInterface().getHeadSelectedUnit():
+ if CyInterface().getHeadSelectedUnit().getScriptData()
== "FIRST_WARRIOR":
+ return True
+
+ if self.tutorial.bGoWestNotAllowed:
+ if eMessage == int(GameMessageTypes.GAMEMESSAGE_PUSH_MISSION):
+ if iData2 == int(MissionTypes.MISSION_MOVE_TO) and iData3 <= 19:
+ self.tutorial.doErrorPopup("TXT_KEY_TUTORIAL_GO_WEST_NOT_ALLOWED")
+ return True
+
+ if eMessage == int(GameMessageTypes.GAMEMESSAGE_PUSH_MISSION):
+ if self.tutorial.bWaitForUnitFortify:
+ if iData2 == int(MissionTypes.MISSION_FORTIFY):
+ self.tutorial.bWaitForUnitFortify = False
+ self.screen.doNextInfo()
+ return False
+ if CyInterface().getHeadSelectedUnit():
+ if CyInterface().getHeadSelectedUnit().getScriptData() ==
self.tutorial.szScriptData:
+ if self.tutorial.iForceActionInterfaceModeTypes ==
int(InterfaceModeTypes.INTERFACEMODE_GO_TO):
+ if self.tutorial.isValidPlot(CyMap().plot(iData3,iData4)):
+ if self.tutorial.bWaitForGoToAction:
+ self.tutorial.bWaitForGoToAction = False
+ self.screen.doNextInfo()
+ return False
+ return False
+
self.tutorial.doErrorPopup("TXT_KEY_TUTORIAL_ERROR_GO_TO_NOT_ALLOWED")
+ return True
+ if self.tutorial.iForceActionInterfaceModeTypes ==
int(InterfaceModeTypes.INTERFACEMODE_ROUTE_TO):
+ if self.tutorial.isValidPlot(CyMap().plot(iData3,iData4)):
+ if self.tutorial.bWaitForRouteToAction:
+ self.tutorial.bWaitForRouteToAction = False
+ self.screen.doNextInfo()
+ return False
+ return False
+
self.tutorial.doErrorPopup("TXT_KEY_TUTORIAL_ERROR_ROUTE_TO_NOT_ALLOWED")
+ return True
+ if self.tutorial.bWaitForWorkerToBuild:
+ if iData2 == int(MissionTypes.MISSION_BUILD):
+ return False
+ return False
+ #### Sanguo Mod Tutorial, end
+
return False
def cannotDoControl(self,argsList):
eControl = argsList[0]
+
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ screens =
[ControlTypes.CONTROL_CIVILOPEDIA,ControlTypes.CONTROL_FOREIGN_SCREEN,ControlTypes.CONTROL_FINANCIAL_SCREEN,ControlTypes.CONTROL_MILITARY_SCREEN,ControlTypes.CONTROL_TECH_CHOOSER,ControlTypes.CONTROL_DOMESTIC_SCREEN,ControlTypes.CONTROL_VICTORY_SCREEN,ControlTypes.CONTROL_INFO]
+
+ if eControl != -1:
+ if eControl == int(ControlTypes.CONTROL_SAVE_NORMAL) or eControl ==
int(ControlTypes.CONTROL_QUICK_SAVE):
+ return (gc.getGame().countCivPlayersAlive() == 1 and
gc.getGame().getGameState() == GameStateTypes.GAMESTATE_ON)
+ elif eControl == int(ControlTypes.CONTROL_SELECTCAPITAL) and
self.tutorial.bCanOpenCityScreen == False:
+ self.tutorial.doErrorPopup("TXT_KEY_TUTORIAL_ERROR_CANNOT_OPEN_CITY")
+ return True
+ elif eControl == int(ControlTypes.CONTROL_ENDTURN) and
self.tutorial.bCanEndTurn == False:
+
self.tutorial.doErrorPopup("TXT_KEY_TUTORIAL_ERROR_END_TURN_NOT_ALLOWED")
+ return True
+ elif eControl == int(ControlTypes.CONTROL_ENDTURN_ALT) and
self.tutorial.bCanEndTurn == False:
+
self.tutorial.doErrorPopup("TXT_KEY_TUTORIAL_ERROR_END_TURN_NOT_ALLOWED")
+ return True
+ elif eControl == int(ControlTypes.CONTROL_FORCEENDTURN) and
self.tutorial.bCanEndTurn == False:
+
self.tutorial.doErrorPopup("TXT_KEY_TUTORIAL_ERROR_END_TURN_NOT_ALLOWED")
+ return True
+ elif eControl == int(ControlTypes.CONTROL_RELIGION_SCREEN) and
self.tutorial.bCanOpenReligionScreen == False:
+
self.tutorial.doErrorPopup("TXT_KEY_TUTORIAL_RELIGION_SCREEN_NOT_ALLOWED")
+ return True
+ elif eControl == int(ControlTypes.CONTROL_CIVICS_SCREEN) and
self.tutorial.bCanOpenCivicScreen == False:
+
self.tutorial.doErrorPopup("TXT_KEY_TUTORIAL_CIVIC_SCREEN_NOT_ALLOWED")
+ return True
+ elif eControl == int(ControlTypes.CONTROL_DIPLOMACY) and
self.tutorial.bCanOpenDiplomacyScreen == False:
+
self.tutorial.doErrorPopup("TXT_KEY_TUTORIAL_DIPLOMACY_SCREEN_NOT_ALLOWED")
+ return True
+ elif self.tutorial.bCanOpenAllOtherScreens == False:
+ for i in screens:
+ if int(i) == eControl:
+
self.tutorial.doErrorPopup("TXT_KEY_TUTORIAL_OTHER_SCREEN_NOT_ALLOWED")
+ return True
+
+ return False
+
+ return False
+ #### Sanguo Mod Tutorial, end
+
return False
def canResearch(self,argsList):
ePlayer = argsList[0]
eTech = argsList[1]
bTrade = argsList[2]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bCanResearch
+ #### Sanguo Mod Tutorial, end
return False
def cannotResearch(self,argsList):
ePlayer = argsList[0]
eTech = argsList[1]
bTrade = argsList[2]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ if self.tutorial.iCannotResearch:
+ if ePlayer == 0 and eTech != self.tutorial.iCannotResearch:
+ return True
+ elif ePlayer == 1 and eTech == self.tutorial.iCannotResearch:
+ return True
+ return False
+
+ return self.tutorial.bCannotResearch
+ #### Sanguo Mod Tutorial, end
return False
def canDoCivic(self,argsList):
ePlayer = argsList[0]
eCivic = argsList[1]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bCanDoCivic
+ #### Sanguo Mod Tutorial, end
return False
def cannotDoCivic(self,argsList):
ePlayer = argsList[0]
eCivic = argsList[1]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bCannotDoCivic
+ #### Sanguo Mod Tutorial, end
return False
def canTrain(self,argsList):
@@ -160,6 +438,11 @@
bIgnoreCost = argsList[4]
bIgnoreUpgrades = argsList[5]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bCanTrain
+ #### Sanguo Mod Tutorial, end
+
return False
def cannotTrain(self,argsList):
@@ -169,6 +452,18 @@
bTestVisible = argsList[3]
bIgnoreCost = argsList[4]
bIgnoreUpgrades = argsList[5]
+
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ if self.tutorial.iForcedUnit == eUnit:
+ return False
+
+ if bTestVisible:
+ return False
+
+ return self.tutorial.bCannotTrain
+ #### Sanguo Mod Tutorial, end
+
return False
def canConstruct(self,argsList):
@@ -176,7 +471,13 @@
eBuilding = argsList[1]
bContinue = argsList[2]
bTestVisible = argsList[3]
- bIgnoreCost = argsList[4]
+ bIgnoreCost = argsList[4]
+
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bCanConstruct
+ #### Sanguo Mod Tutorial, end
+
return False
def cannotConstruct(self,argsList):
@@ -186,6 +487,21 @@
bTestVisible = argsList[3]
bIgnoreCost = argsList[4]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ if self.tutorial.bStoneHengeAllowed == False:
+ if eBuilding ==
CvUtil.findInfoTypeNum(gc.getBuildingInfo,gc.getNumBuildingInfos(),"BUILDING_STONEHENGE"):
+ return True
+ # if bIgnoreCost:
+ # return False
+ if bTestVisible:
+ return False
+ if self.tutorial.iForcedBuilding == eBuilding:
+ return False
+
+ return self.tutorial.bCannotConstruct
+ #### Sanguo Mod Tutorial, end
+
return False
def canCreate(self,argsList):
@@ -193,6 +509,10 @@
eProject = argsList[1]
bContinue = argsList[2]
bTestVisible = argsList[3]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bCanCreate
+ #### Sanguo Mod Tutorial, end
return False
def cannotCreate(self,argsList):
@@ -200,31 +520,57 @@
eProject = argsList[1]
bContinue = argsList[2]
bTestVisible = argsList[3]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bCannotCreate
+ #### Sanguo Mod Tutorial, end
return False
def canMaintain(self,argsList):
pCity = argsList[0]
eProcess = argsList[1]
bContinue = argsList[2]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bCanMaintain
+ #### Sanguo Mod Tutorial, end
return False
def cannotMaintain(self,argsList):
pCity = argsList[0]
eProcess = argsList[1]
bContinue = argsList[2]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bCannotMaintain
+ #### Sanguo Mod Tutorial, end
return False
def AI_chooseTech(self,argsList):
ePlayer = argsList[0]
bFree = argsList[1]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.iAI_chooseTech
+ #### Sanguo Mod Tutorial, end
return TechTypes.NO_TECH
def AI_chooseProduction(self,argsList):
pCity = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.iAI_chooseProduction
+ #### Sanguo Mod Tutorial, end
return False
def AI_unitUpdate(self,argsList):
pUnit = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ if (self.tutorial.bForceLionMoveNorth == True and
self.__doLionMove(pUnit)):
+ return True
+ return False
+ #### Sanguo Mod Tutorial, end
return False
def AI_doWar(self,argsList):
@@ -239,6 +585,12 @@
ePlayer = argsList[0]
bFinal = argsList[1]
bVictory = argsList[2]
+
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ if not self.tutorial.bCalculateScore:
+ return CyGlobalContext().getPlayer(ePlayer).getAssets()
+ #### Sanguo Mod Tutorial, end
iPopulationScore =
CvUtil.getScoreComponent(gc.getPlayer(ePlayer).getPopScore(),
gc.getGame().getInitPopulation(), gc.getGame().getMaxPopulation(),
gc.getDefineINT("SCORE_POPULATION_FACTOR"), True, bFinal, bVictory)
iLandScore =
CvUtil.getScoreComponent(gc.getPlayer(ePlayer).getLandScore(),
gc.getGame().getInitLand(), gc.getGame().getMaxLand(),
gc.getDefineINT("SCORE_LAND_FACTOR"), True, bFinal, bVictory)
@@ -258,28 +610,82 @@
def doGold(self,argsList):
ePlayer = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bDoGold
+ #### Sanguo Mod Tutorial, end
return False
def doResearch(self,argsList):
ePlayer = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bDoResearch
+ #### Sanguo Mod Tutorial, end
return False
def doGoody(self,argsList):
ePlayer = argsList[0]
pPlot = argsList[1]
pUnit = argsList[2]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ if self.tutorial.bWaitForVillageDiscovered == True:
+ self.tutorial.bWaitForVillageDiscovered = False
+ self.tutorial.iGoodiesReceived += 1
+ if self.tutorial.iGoodiesReceived == 1:
+
CyMap().plot(25,18).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(25,16).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(25,17).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(25,19).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(25,20).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(26,16).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(26,17).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(26,18).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(26,19).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(26,20).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(24,16).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(24,17).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(24,18).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(24,19).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(24,20).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+
CyMap().plot(25,15).setRevealed(CyGame().getActiveTeam(),1,0,TeamTypes.NO_TEAM)
+ pPlot.setImprovementType( int(ImprovementTypes.NO_IMPROVEMENT) )
+ print ("doNextInfo doGoody")
+ self.screen.doNextInfo()
+ if self.tutorial.iGoodiesReceived == 2:
+ gc.getPlayer(gc.getGame().getActivePlayer()).setGold(100)
+ pPlot.setImprovementType( int(ImprovementTypes.NO_IMPROVEMENT) )
+ print ("doNextInfo doGoody2")
+ self.screen.doNextInfo()
+ return True
+ return self.tutorial.bDoGoody
+ #### Sanguo Mod Tutorial, end
+
return False
def doGrowth(self,argsList):
pCity = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bDoGrowth
+ #### Sanguo Mod Tutorial, end
return False
def doProduction(self,argsList):
pCity = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bDoProduction
+ #### Sanguo Mod Tutorial, end
return False
def doCulture(self,argsList):
pCity = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bDoCulture
+ #### Sanguo Mod Tutorial, end
return False
def doPlotCulture(self,argsList):
@@ -287,10 +693,18 @@
bUpdate = argsList[1]
ePlayer = argsList[2]
iCultureRate = argsList[3]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bDoPlotCulture
+ #### Sanguo Mod Tutorial, end
return False
def doReligion(self,argsList):
pCity = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bDoReligion
+ #### Sanguo Mod Tutorial, end
return False
def cannotSpreadReligion(self,argsList):
@@ -299,10 +713,18 @@
def doGreatPeople(self,argsList):
pCity = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bDoGreatPeople
+ #### Sanguo Mod Tutorial, end
return False
def doMeltdown(self,argsList):
pCity = argsList[0]
+ #### Sanguo Mod Tutorial, start, by poyuzhe 09.27.09
+ if (gc.getGame().getTutorialID() > -1):
+ return self.tutorial.bDoMeltDown
+ #### Sanguo Mod Tutorial, end
return False
def doReviveActivePlayer(self,argsList):
@@ -424,4 +846,18 @@
#### Sanguo Mod Hero, end
return iExperienceNeeded
-
+
+ def __doLionMove(self,unit):
+ player = gc.getPlayer(unit.getOwner())
+ if ( player.isBarbarian()):
+ self.__doMoveUnit( (unit, MissionTypes.MISSION_MOVE_TO, unit.getX(),
(unit.getY()+1), 0, True, True, MissionAITypes.NO_MISSIONAI, unit.plot(),
unit) )
+ return True
+
+ def __doMoveUnit(self,argsList):
+ pUnit, MissionType, unitX, unitY, iFlags, bAppend, bManual,
MissionAITypes, pPlotAIMission, pUnitMissionAI = argsList
+ pUnit.getGroup().pushMission( MissionType, unitX, unitY, iFlags,
bAppend, bManual, MissionAITypes, pPlotAIMission, pUnitMissionAI )
+
+
+
+
+
=======================================
--- /trunk/The History of Three
Kingdoms/Assets/Python/EntryPoints/CvScreensInterface.py Sun Sep 27
18:36:06 2009
+++ /trunk/The History of Three
Kingdoms/Assets/Python/EntryPoints/CvScreensInterface.py Tue Sep 29
23:51:43 2009
@@ -1176,7 +1176,7 @@
elif (iData1 == FeatTypes.FEAT_FORM_ADVANCED_LEGION):
pediaShowHistorical([CivilopediaPageTypes.CIVILOPEDIA_PAGE_CONCEPT_NEW,
gc.getInfoTypeForString("CONCEPT_ARMY")])
elif (iData1 == FeatTypes.FEAT_CREATE_RANDOM_HERO):
-
pediaShowHistorical([CivilopediaPageTypes.CIVILOPEDIA_PAGE_CONCEPT_NEW,
gc.getInfoTypeForString("CONCEPT_RANDOM_HERO")])
+ pediaJumpToHero([iData3])
elif (iData1 == FeatTypes.FEAT_BUILD_CITY_WONDER):
pediaShowHistorical([CivilopediaPageTypes.CIVILOPEDIA_PAGE_CONCEPT_NEW,
gc.getInfoTypeForString("CONCEPT_CITY_WONDER")])
elif (iData1 == FeatTypes.FEAT_GAIN_CITY_PERK):
=======================================
--- /trunk/The History of Three
Kingdoms/Assets/Python/Screens/CvCreateChampionScreen.py Sat Sep 19
05:22:49 2009
+++ /trunk/The History of Three
Kingdoms/Assets/Python/Screens/CvCreateChampionScreen.py Tue Sep 29
23:51:43 2009
@@ -362,6 +362,11 @@
def drawPediaContent(self, iHero):
screen = self.getScreen()
+
+ screen.deleteWidget("Concept")
+ screen.deleteWidget(self.MainChoiceWidget)
+ screen.deleteWidget(self.SecondaryChoiceWidget)
+ screen.deleteWidget(self.HelpTextWidget)
screen.addPanel("PortraitPanel", "", "", False, False, self.X_UNIT_PANE,
self.Y_UNIT_PANE, self.W_UNIT_PANE, self.H_UNIT_PANE,
PanelStyles.PANEL_STYLE_BLUE50)
screen.addDDSGFC("Portrait", gc.getHeroInfo(iHero).getPortrait(),
self.X_ICON, self.Y_ICON, self.W_ICON, self.H_ICON,
WidgetTypes.WIDGET_GENERAL, -1, -1)
@@ -371,9 +376,10 @@
screen.addPanel(panelName, localText.getText("TXT_KEY_PEDIA_HERO_STATS",
()), "", False, True, self.X_UNIT_ANIMATION, self.Y_UNITCOMBAT_PANE,
self.W_UNIT_ANIMATION, self.H_UNITCOMBAT_PANE,
PanelStyles.PANEL_STYLE_BLUE50)
screen.attachLabel(panelName, "", " ")
- screen.setTextAt("Leadership", panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_LEADERSHIP",
(gc.getHeroInfo(iHero).getLeadership(), )), CvUtil.FONT_CENTER_JUSTIFY, 5,
15, 0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
- screen.setTextAt("Might", panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_MIGHT",
(gc.getHeroInfo(iHero).getMight(), )), CvUtil.FONT_CENTER_JUSTIFY, 5, 35,
0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
- screen.setTextAt("XP", panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_EXPERIENCE",
(int(gc.getGame().getHeroExperience(iHero)), )),
CvUtil.FONT_CENTER_JUSTIFY, 5, 55, 0, FontTypes.GAME_FONT,
WidgetTypes.WIDGET_GENERAL, -1, -1)
+ screen.setTextAt("Name", panelName,
gc.getHeroInfo(iHero).getDescription(), CvUtil.FONT_CENTER_JUSTIFY, 5, 0,
0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
+ screen.setTextAt("Leadership", panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_LEADERSHIP",
(gc.getHeroInfo(iHero).getLeadership(), )), CvUtil.FONT_CENTER_JUSTIFY, 5,
18, 0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
+ screen.setTextAt("Might", panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_MIGHT",
(gc.getHeroInfo(iHero).getMight(), )), CvUtil.FONT_CENTER_JUSTIFY, 5, 36,
0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
+ screen.setTextAt("XP", panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_EXPERIENCE",
(int(gc.getGame().getHeroExperience(iHero)), )),
CvUtil.FONT_CENTER_JUSTIFY, 5, 54, 0, FontTypes.GAME_FONT,
WidgetTypes.WIDGET_GENERAL, -1, -1)
self.placeCivAndBelief(iHero)
self.placeUnitCombatLevel(iHero)
=======================================
--- /trunk/The History of Three
Kingdoms/Assets/Python/Screens/CvHeroAdvisor.py Sun Sep 27 18:36:06 2009
+++ /trunk/The History of Three
Kingdoms/Assets/Python/Screens/CvHeroAdvisor.py Tue Sep 29 23:51:43 2009
@@ -893,9 +893,10 @@
screen.addPanel(panelName, localText.getText("TXT_KEY_PEDIA_HERO_STATS",
()), "", False, True, self.X_UNIT_ANIMATION, self.Y_UNITCOMBAT_PANE,
self.W_UNIT_ANIMATION, self.H_UNITCOMBAT_PANE,
PanelStyles.PANEL_STYLE_BLUE50)
screen.attachLabel(panelName, "", " ")
- screen.setTextAt("Leadership", panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_LEADERSHIP",
(gc.getHeroInfo(iHero).getLeadership(), )), CvUtil.FONT_CENTER_JUSTIFY, 5,
15, 0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
- screen.setTextAt("Might", panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_MIGHT",
(gc.getHeroInfo(iHero).getMight(), )), CvUtil.FONT_CENTER_JUSTIFY, 5, 35,
0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
- screen.setTextAt("XP", panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_EXPERIENCE",
(int(gc.getGame().getHeroExperience(iHero)), )),
CvUtil.FONT_CENTER_JUSTIFY, 5, 55, 0, FontTypes.GAME_FONT,
WidgetTypes.WIDGET_GENERAL, -1, -1)
+ screen.setTextAt("Name", panelName,
gc.getHeroInfo(iHero).getDescription(), CvUtil.FONT_CENTER_JUSTIFY, 5, 0,
0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
+ screen.setTextAt("Leadership", panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_LEADERSHIP",
(gc.getHeroInfo(iHero).getLeadership(), )), CvUtil.FONT_CENTER_JUSTIFY, 5,
18, 0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
+ screen.setTextAt("Might", panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_MIGHT",
(gc.getHeroInfo(iHero).getMight(), )), CvUtil.FONT_CENTER_JUSTIFY, 5, 36,
0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
+ screen.setTextAt("XP", panelName,
localText.getText("TXT_KEY_RECRUIT_HERO_EXPERIENCE",
(int(gc.getGame().getHeroExperience(iHero)), )),
CvUtil.FONT_CENTER_JUSTIFY, 5, 54, 0, FontTypes.GAME_FONT,
WidgetTypes.WIDGET_GENERAL, -1, -1)
self.placeCivAndBelief(iHero)
self.placeUnitCombatLevel(iHero)
@@ -912,8 +913,9 @@
else:
screen.deleteWidget( "Persuade" )
- screen.setButtonGFC( "Execute",
localText.getText("TXT_KEY_SCREEN_EXECUTE", ()), "", iLeft + 76 +
iInsideGap * 2, iTop + 2, 76, 30, self.ExecuteWidget, -1, -1,
ButtonStyles.BUTTON_STYLE_STANDARD )
- screen.setActivation( "Execute",
ActivationTypes.ACTIVATE_MIMICPARENTFOCUS )
+ if
gc.getGame().isOption(gc.getInfoTypeForString("GAMEOPTION_NO_HERO_EXECUTION"))
== False:
+ screen.setButtonGFC( "Execute",
localText.getText("TXT_KEY_SCREEN_EXECUTE", ()), "", iLeft + 76 +
iInsideGap * 2, iTop + 2, 76, 30, self.ExecuteWidget, -1, -1,
ButtonStyles.BUTTON_STYLE_STANDARD )
+ screen.setActivation( "Execute",
ActivationTypes.ACTIVATE_MIMICPARENTFOCUS )
screen.setButtonGFC( "Release",
localText.getText("TXT_KEY_SCREEN_RELEASE", ()), "", iLeft + 76 * 2 +
iInsideGap * 3, iTop + 2, 76, 30, self.ReleaseWidget, -1, -1,
ButtonStyles.BUTTON_STYLE_STANDARD )
screen.setActivation( "Release",
ActivationTypes.ACTIVATE_MIMICPARENTFOCUS )
=======================================
--- /trunk/The History of Three Kingdoms/Assets/Python/pyWB/CvWBDesc.py Sun
Sep 27 18:36:06 2009
+++ /trunk/The History of Three Kingdoms/Assets/Python/pyWB/CvWBDesc.py Tue
Sep 29 23:51:43 2009
@@ -2115,10 +2115,10 @@
'HANDICAP_DEITY' : 0
}
DupProb = { 'HANDICAP_PRINCE' : 10,
- 'HANDICAP_MONARCH' : 20,
- 'HANDICAP_EMPEROR' : 30,
- 'HANDICAP_IMMORTAL' : 40,
- 'HANDICAP_DEITY' : 50
+ 'HANDICAP_MONARCH' : 30,
+ 'HANDICAP_EMPEROR' : 50,
+ 'HANDICAP_IMMORTAL' : 70,
+ 'HANDICAP_DEITY' : 90
}
DupTimes = { 'HANDICAP_PRINCE' : 1,
'HANDICAP_MONARCH' : 1,
=======================================
--- /trunk/The History of Three
Kingdoms/Assets/XML/Civilizations/CIV4TraitInfos.xml Tue Aug 11 09:33:16
2009
+++ /trunk/The History of Three
Kingdoms/Assets/XML/Civilizations/CIV4TraitInfos.xml Tue Sep 29 23:51:43
2009
@@ -671,47 +671,6 @@
<bPeasant>0</bPeasant>
</TraitInfo>
<TraitInfo>
- <Type>TRAIT_POET</Type>
- <Description>TXT_KEY_TRAIT_POET</Description>
- <ShortDescription>TXT_KEY_TRAIT_POET_SHORT</ShortDescription>
- <Help>TXT_KEY_TRAIT_POET_HELP</Help>
- <iHealth>0</iHealth>
- <iHappiness>0</iHappiness>
- <iMaxAnarchy>-1</iMaxAnarchy>
- <iUpkeepModifier>0</iUpkeepModifier>
- <iLevelExperienceModifier>0</iLevelExperienceModifier>
- <iGreatPeopleRateModifier>0</iGreatPeopleRateModifier>
- <iGreatGeneralRateModifier>0</iGreatGeneralRateModifier>
- <iDomesticGreatGeneralRateModifier>0</iDomesticGreatGeneralRateModifier>
-
<iMaxGlobalBuildingProductionModifier>0</iMaxGlobalBuildingProductionModifier>
-
<iMaxTeamBuildingProductionModifier>0</iMaxTeamBuildingProductionModifier>
-
<iMaxPlayerBuildingProductionModifier>0</iMaxPlayerBuildingProductionModifier>
- <ExtraYieldThresholds/>
- <TradeYieldModifiers/>
- <CommerceChanges/>
- <CommerceModifiers/>
- <FreePromotions/>
- <FreePromotionUnitCombats/>
- <SpecialistYieldChanges/>
- <SpecialistCommerceChanges/>
- <bBenevolent>0</bBenevolent>
- <TerrainExperienceModifiers/>
- <GlobalSeaPlotYieldChanges/>
- <bFamous>0</bFamous>
- <PeaceCommerceModifiers/>
- <PeakYieldChanges/>
- <IgnoreBuildingDefenseCombatType/>
- <bTough>0</bTough>
- <BaseImmigrationChance>0</BaseImmigrationChance>
- <FeatureYieldChanges/>
- <FeatureHealthChanges/>
- <FeatureProductionChanges/>
- <FeatureGrowthChanges/>
- <bDiplomatic>0</bDiplomatic>
- <bCelebrity>0</bCelebrity>
- <bPeasant>0</bPeasant>
- </TraitInfo>
- <TraitInfo>
<Type>TRAIT_IRON_WILL</Type>
<Description>TXT_KEY_TRAIT_IRON_WILL</Description>
<ShortDescription>TXT_KEY_TRAIT_IRON_WILL_SHORT</ShortDescription>
=======================================
--- /trunk/The History of Three
Kingdoms/Assets/XML/GameInfo/CIV4GameOptionInfos.xml Thu Sep 24 10:17:15
2009
+++ /trunk/The History of Three
Kingdoms/Assets/XML/GameInfo/CIV4GameOptionInfos.xml Tue Sep 29 23:51:43
2009
@@ -181,13 +181,34 @@
<bDefault>0</bDefault>
<bVisible>1</bVisible>
</GameOptionInfo>
- <!-- <GameOptionInfo>
+ <GameOptionInfo>
<Type>GAMEOPTION_NO_HERO_DEATH_FROM_AGE</Type>
<Description>TXT_KEY_GAME_OPTION_NO_HERO_DEATH_FROM_AGE</Description>
<Help>TXT_KEY_GAME_OPTION_NO_HERO_DEATH_FROM_AGE_HELP</Help>
<bDefault>0</bDefault>
<bVisible>1</bVisible>
- </GameOptionInfo> -->
+ </GameOptionInfo>
+ <GameOptionInfo>
+ <Type>GAMEOPTION_NO_HERO_EXECUTION</Type>
+ <Description>TXT_KEY_GAME_OPTION_NO_HERO_EXECUTION</Description>
+ <Help>TXT_KEY_GAME_OPTION_NO_HERO_EXECUTION_HELP</Help>
+ <bDefault>0</bDefault>
+ <bVisible>1</bVisible>
+ </GameOptionInfo>
+ <GameOptionInfo>
+ <Type>GAMEOPTION_ENABLE_ARMY</Type>
+ <Description>TXT_KEY_GAME_OPTION_ENABLE_ARMY</Description>
+ <Help>TXT_KEY_GAME_OPTION_ENABLE_ARMY_HELP</Help>
+ <bDefault>0</bDefault>
+ <bVisible>1</bVisible>
+ </GameOptionInfo>
+ <GameOptionInfo>
+ <Type>GAMEOPTION_HIGH_HERO_DEATH_CHANCE</Type>
+ <Description>TXT_KEY_GAME_OPTION_HIGH_HERO_DEATH_CHANCE</Description>
+ <Help>TXT_KEY_GAME_OPTION_HIGH_HERO_DEATH_CHANCE_HELP</Help>
+ <bDefault>0</bDefault>
+ <bVisible>1</bVisible>
+ </GameOptionInfo>
<GameOptionInfo>
<Type>GAMEOPTION_NO_SETTLER</Type>
<Description>TXT_KEY_GAME_OPTION_NO_SETTLER</Description>
=======================================
--- /trunk/The History of Three
Kingdoms/Assets/XML/Text/CIV4GameText_Sanguo_Hero.xml Fri Sep 25 08:21:08
2009
+++ /trunk/The History of Three
Kingdoms/Assets/XML/Text/CIV4GameText_Sanguo_Hero.xml Tue Sep 29 23:51:43
2009
Binary file, no diff available.
=======================================
--- /trunk/The History of Three
Kingdoms/Assets/XML/Text/CIV4GameText_Sanguo_New.xml Sun Sep 27 18:36:06
2009
+++ /trunk/The History of Three
Kingdoms/Assets/XML/Text/CIV4GameText_Sanguo_New.xml Tue Sep 29 23:51:43
2009
Binary file, no diff available.
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvEnums.h Sun Sep 27
18:36:06 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvEnums.h Tue Sep 29
23:51:43 2009
@@ -742,7 +742,10 @@
GAMEOPTION_NO_ESPIONAGE,
// Sanguo Mod Hero, start, added by poyuzhe 02.08.09
GAMEOPTION_NO_HERO_DEATH_FROM_COMBAT,
- //GAMEOPTION_NO_HERO_DEATH_FROM_AGE,
+ GAMEOPTION_NO_HERO_DEATH_FROM_AGE,
+ GAMEOPTION_NO_HERO_EXECUTION,
+ GAMEOPTION_ENABLE_ARMY,
+ GAMEOPTION_HIGH_HERO_DEATH_CHANCE,
GAMEOPTION_NO_SETTLER,
// Sanguo Mod Hero, end
@@ -2878,6 +2881,12 @@
{
NO_SURRENDER = -1,
};
+
+// Random leader
+enum RandomLeaderTypes // exposed to python
+{
+ NO_RANDOMLEADER = -1,
+};
// Sanguo Mod XML, end
#endif // CVENUMS_h
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGame.cpp Sun Sep
27 18:36:06 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGame.cpp Tue Sep
29 23:51:43 2009
@@ -294,7 +294,7 @@
}
for (iJ = 0; iJ < GC.getNumPromotionInfos(); iJ++)
{
- setHeroPromotionStatus((HeroTypes)iI, (PromotionTypes)iJ,
GC.getHeroInfo((HeroTypes)iI).getUnitPromotionStatus(iJ));
+ setHeroPromotionStatus((HeroTypes)iI, (PromotionTypes)iJ,
GC.getHeroInfo((HeroTypes)iI).getUnitPromotionStatus(iJ), false);
}
if (GC.getHeroInfo((HeroTypes)iI).getHistoricalDieYear() <=
getGameTurnYear())
@@ -486,7 +486,7 @@
// Sanguo Mod Hero, start, added by poyuzhe 08.10.09
while(m_paNewLeaders.size() > 0)
{
- GC.getLeaderHeadInfo().pop_back();
+ GC.getRandomLeaderInfo().pop_back();
GC.setInfoTypeFromString(m_paNewLeaders.back()->getType(), -1);
m_paNewLeaders.pop_back();
}
@@ -8311,8 +8311,8 @@
CvLeaderHeadInfo* pNewLeaderHeadInfo = new CvLeaderHeadInfo;
pNewLeaderHeadInfo->read(pStream);
m_paNewLeaders.push_back(pNewLeaderHeadInfo);
- GC.getLeaderHeadInfo().push_back(pNewLeaderHeadInfo);
- GC.setInfoTypeFromString(pNewLeaderHeadInfo->getType(),
GC.getLeaderHeadInfo().size() - 1);
+ GC.getRandomLeaderInfo().push_back(pNewLeaderHeadInfo);
+ GC.setInfoTypeFromString(pNewLeaderHeadInfo->getType(),
GC.getRandomLeaderInfo().size() - 1);
}
}
@@ -9921,6 +9921,7 @@
FAssert (eUnitCombat > -1 && eUnitCombat < GC.getNumUnitCombatInfos());
bool bReformLegion = false;
bool bReformAdvancedLegion = false;
+ bool bLeader = false;
if (iNewValue == m_ppaiHeroUnitCombatLevel[eHero][eUnitCombat])
{
@@ -9933,17 +9934,23 @@
{
CvUnit* pHero = getHeroUnit(eHero);
FAssert (pHero != NULL);
- if (pHero->getHeroType() == eHero)
+ if (pHero->getLeaderHero() == NO_HERO)
{
if (pHero->getUnitCombatType() == eUnitCombat)
{
bReformLegion = true;
}
}
- else
+ else if (pHero->getLeaderHero() == eHero)
{
bReformAdvancedLegion = true;
- }
+ bLeader = true;
+ }
+ else
+ {
+ bReformAdvancedLegion = true;
+ bLeader = false;
+ }
}
}
@@ -9963,7 +9970,39 @@
}
else
{
- if (iNewValue > m_ppaiHeroUnitCombatLevel[eHero][eUnitCombat])
+ if (bLeader)
+ {
+ CvUnit* pLeader = getHeroUnit(eHero);
+ FAssert (pLeader != NULL);
+ CvUnit* pHero = pLeader->dismissAdvancedLegion(true);
+ m_ppaiHeroUnitCombatLevel[eHero][eUnitCombat] = iNewValue;
+ swapHeroLegionList(eHero);
+ pHero->formAdvancedLegion(false, true);
+ }
+ else
+ {
+ CvUnit* pCore = getHeroUnit(eHero);
+ FAssert (pCore != NULL);
+ if (pCore->getUnitCombatType() == eUnitCombat)
+ {
+ HeroTypes eLeaderHero = pCore->getLeaderHero();
+ int iLeaderID = getHeroUnitID(eLeaderHero);
+ bool bLeaderTroop = (iLeaderID == pCore->getID());
+ pCore->quitAdvancedLegion(true);
+ backUpHeroLegionMember(eHero);
+ FAssert (pCore->getHeroType() >= 0 && pCore->getHeroType() <
GC.getNumHeroInfos());
+ pCore->processLegion(false, true, false, false);
+ m_ppaiHeroUnitCombatLevel[eHero][eUnitCombat] = iNewValue;
+ pCore->processLegion(false, false, true, false);
+ pCore->joinAdvancedLegion(getHeroUnitID(eLeaderHero), bLeaderTroop);
+ }
+ else
+ {
+ m_ppaiHeroUnitCombatLevel[eHero][eUnitCombat] = iNewValue;
+ }
+ }
+
+ /*if (iNewValue > m_ppaiHeroUnitCombatLevel[eHero][eUnitCombat])
{
for (int iI = 0; iI < getHeroLegionSize(eHero); iI++)
{
@@ -10037,7 +10076,7 @@
}
}
}
- m_ppaiHeroUnitCombatLevel[eHero][eUnitCombat] = iNewValue;
+ m_ppaiHeroUnitCombatLevel[eHero][eUnitCombat] = iNewValue;*/
}
FAssert (m_ppaiHeroUnitCombatLevel[eHero][eUnitCombat] <=
GC.getHeroInfo(eHero).getPotentialUnitCombatLevel(eUnitCombat));
@@ -10055,16 +10094,33 @@
return m_ppaiHeroPromotionStatus[eHero][ePromotion];
}
-void CvGame::setHeroPromotionStatus(HeroTypes eHero, PromotionTypes
ePromotion, int iNewValue)
+void CvGame::setHeroPromotionStatus(HeroTypes eHero, PromotionTypes
ePromotion, int iNewValue, bool bFromNineTransformation)
{
FAssert (eHero > -1 && eHero < GC.getNumHeroInfos());
FAssert (ePromotion > -1 && ePromotion < GC.getNumPromotionInfos());
bool bReformLegion = false;
bool bReformAdvancedLegion = false;
+ bool bLeader = false;
if (m_ppaiHeroPromotionStatus[eHero][ePromotion] == iNewValue)
{
- return;
+ if (isHeroNineTransformationPromotion(eHero, ePromotion))
+ {
+ CvHeroMap::iterator iter = m_mapHeroes.find(eHero);
+ if (find((iter->second).aNineTransformationPromotions.begin(),
(iter->second).aNineTransformationPromotions.end(), ePromotion) !=
(iter->second).aNineTransformationPromotions.end())
+ {
+ return;
+ }
+ else
+ {
+ (iter->second).m_eCurrentNineTransformationPromotion = NO_PROMOTION;
+ return;
+ }
+ }
+ else
+ {
+ return;
+ }
}
int iChange = 0;
@@ -10088,13 +10144,17 @@
if (getHeroLegionSize(eHero) > 0)
{
CvUnit* pCoreTroop =
GET_PLAYER((PlayerTypes)getHeroDebutStatus(eHero)).getUnit(getHeroCoreTroop(eHero));
- if (pCoreTroop->getHeroType() == eHero)
+ if (pCoreTroop->getLeaderHero() == NO_HERO)
{
bReformLegion = true;
}
else
{
bReformAdvancedLegion = true;
+ if (pCoreTroop->getLeaderHero() == eHero)
+ {
+ bLeader = true;
+ }
}
}
}
@@ -10115,7 +10175,84 @@
}
else
{
- CvUnit* pHero = getHeroUnit(eHero);
+ if (bLeader)
+ {
+ // If it's a core troop promotion, then only add/remove with the
guardian unit
+ if (iNewValue == 1 || m_ppaiHeroPromotionStatus[eHero][ePromotion] == 1)
+ {
+ CvUnit* pLeader = getHeroUnit(eHero);
+ FAssert (pLeader != NULL);
+ if (getHeroPromotionStatus(pLeader->getHeroType(), ePromotion) != 1)
+ {
+ pLeader->setHasPromotion(ePromotion, iNewValue == 1 ? true : false);
+ }
+ m_ppaiHeroPromotionStatus[eHero][ePromotion] = iNewValue;
+ }
+ // this should rarely be called: remove a previously possessed member
promotion
+ else if (m_ppaiHeroPromotionStatus[eHero][ePromotion] == 2)
+ {
+ m_ppaiHeroPromotionStatus[eHero][ePromotion] = iNewValue;
+ for (int iI = 0; iI < getHeroLegionSize(eHero); iI++)
+ {
+ CvUnit* pLoopHero =
GET_PLAYER((PlayerTypes)getHeroDebutStatus(eHero)).getUnit(getHeroLegionMemberAt(eHero,
iI));
+ HeroTypes eLoopHero = pLoopHero->getHeroType();
+
+ // check to see if that promotion is set as member legion's nine
transformation promotion
+ if (!bFromNineTransformation &&
getHeroCurrentNineTransformationPromotion(eLoopHero) == ePromotion)
+ {
+ if (!isHeroNineTransformationPromotion(eLoopHero, ePromotion))
+ {
+ setHeroCurrentNineTransformationPromotion(eLoopHero, NO_PROMOTION);
+ }
+ }
+ }
+ }
+ else
+ {
+ m_ppaiHeroPromotionStatus[eHero][ePromotion] = iNewValue;
+ }
+ }
+ else
+ {
+ CvUnit* pCore = getHeroUnit(eHero);
+ FAssert (pCore != NULL);
+ // if it's a core troop promotion, then check the leader hero's
promotion status, and add/remove where fit
+ // note that in rare cases this could be a nine transformation
promotion: a hero who has nine transformation as innate ability
+ if (iNewValue == 1 || m_ppaiHeroPromotionStatus[eHero][ePromotion] == 1)
+ {
+ if (pCore->isLeaderTroop())
+ {
+ if (getHeroPromotionStatus(pCore->getLeaderHero(), ePromotion) != 1)
+ {
+ pCore->setHasPromotion(ePromotion, iNewValue == 1 ? true : false);
+ }
+ m_ppaiHeroPromotionStatus[eHero][ePromotion] = iNewValue;
+ }
+ }
+ else if (iNewValue == 2 || m_ppaiHeroPromotionStatus[eHero][ePromotion]
== 2)
+ {
+ if (iNewValue == 2 && !bFromNineTransformation &&
getHeroCurrentNineTransformationPromotion(eHero) == ePromotion)
+ {
+ setHeroCurrentNineTransformationPromotion(eHero, NO_PROMOTION);
+ }
+ HeroTypes eLeader = pCore->getLeaderHero();
+ int iLeaderID = getHeroUnitID(eLeader);
+ bool bLeaderTroop = (iLeaderID == pCore->getID());
+ pCore->quitAdvancedLegion(true);
+ backUpHeroLegionMember(eHero);
+ FAssert (pCore->getHeroType() >= 0 && pCore->getHeroType() <
GC.getNumHeroInfos());
+ pCore->processLegion(false, true, false, false);
+ m_ppaiHeroPromotionStatus[eHero][ePromotion] = iNewValue;
+ pCore->processLegion(false, false, true, false);
+ pCore->joinAdvancedLegion(getHeroUnitID(eLeader), bLeaderTroop);
+ }
+ else
+ {
+ m_ppaiHeroUnitCombatLevel[eHero][ePromotion] = iNewValue;
+ }
+ }
+
+ /*CvUnit* pHero = getHeroUnit(eHero);
FAssert (pHero != NULL);
FAssert (pHero->isLeaderTroop());
if (iNewValue == 1 || m_ppaiHeroPromotionStatus[eHero][ePromotion]
== 1)
@@ -10153,7 +10290,7 @@
}
}
}
- }
+ }*/
}
if (iChange != 0)
@@ -10300,7 +10437,7 @@
if (GC.getPromotionInfo(ePromotion).getHeroPromotionStatus() > 0)
{
- setHeroPromotionStatus(eHero, ePromotion,
GC.getPromotionInfo(ePromotion).getHeroPromotionStatus());
+ setHeroPromotionStatus(eHero, ePromotion,
GC.getPromotionInfo(ePromotion).getHeroPromotionStatus(), false);
}
CvUnit* pHero = getHeroUnit(eHero);
@@ -10341,7 +10478,18 @@
if (!bNineTransformation && !bRandom && getHeroPromotionStatus(eHero,
ePromotion) != 3)
{
- return false;
+ if (isHeroNineTransformationPromotion(eHero, ePromotion))
+ {
+ CvHeroMap::const_iterator iter = m_mapHeroes.find(eHero);
+ if (find((iter->second).aNineTransformationPromotions.begin(),
(iter->second).aNineTransformationPromotions.end(), ePromotion) !=
(iter->second).aNineTransformationPromotions.end())
+ {
+ return false;
+ }
+ }
+ else
+ {
+ return false;
+ }
}
if (GC.getPromotionInfo(ePromotion).getHeroUnitCombatLevelChange() != 0)
@@ -10466,7 +10614,7 @@
if (ePlayer > -1)
{
CvUnit* pHero = GET_PLAYER(ePlayer).getUnit(getHeroUnitID(eHero));
- if (pHero != NULL && pHero->getHeroType() != eHero)
+ if (pHero != NULL && pHero->getHeroType() != eHero &&
pHero->getHeroType() != NO_HERO)
{
if (isHeroPromotionReady(pHero->getHeroType()))
{
@@ -10496,7 +10644,7 @@
if (getSorenRandNum(GC.getNumPromotionInfos(), "Random Promotion
Pick") < 5)
{
GC.getHeroInfo(eHero).setUnitPromotionStatus(ePromotion, 3);
- setHeroPromotionStatus(eHero, ePromotion, 3);
+ setHeroPromotionStatus(eHero, ePromotion, 3, false);
iNumSet++;
}
}
@@ -10751,7 +10899,7 @@
m_mapHeroes[eHero].aNineTransformationPromotions.pop_back();
if (getHeroCurrentNineTransformationPromotion(eHero) == ePromotion)
{
- setHeroPromotionStatus(eHero, ePromotion, 0);
+ setHeroPromotionStatus(eHero, ePromotion, 0, true);
}
iLevelChange++;
}
@@ -10811,12 +10959,12 @@
if (eOldPromotion != NO_PROMOTION)
{
- setHeroPromotionStatus(eHero, eOldPromotion, 0);
+ setHeroPromotionStatus(eHero, eOldPromotion, 0, true);
}
if (ePromotion != NO_PROMOTION)
{
- setHeroPromotionStatus(eHero, ePromotion,
GC.getPromotionInfo(ePromotion).getHeroPromotionStatus());
+ setHeroPromotionStatus(eHero, ePromotion,
GC.getPromotionInfo(ePromotion).getHeroPromotionStatus(), true);
}
}
@@ -11826,12 +11974,14 @@
FAssert (GET_PLAYER(ePlayer).isAlive());
FAssert (eHero > -1 && eHero < GC.getNumHeroInfos());
+ pNewLeaderHeadInfo->initRandomLeader();
+
pNewLeaderHeadInfo->setRandom(true);
// find the random portrait
// set portrait, button, civilopedia, strategy, help
CvString szBuffer;
- szBuffer.Format("LEADERHEAD_RANDOM_%d", (int)m_paNewLeaders.size() + 1);
+ szBuffer.Format("LEADERHEAD_RANDOM_%d", (int)GC.getNumRandomLeaderInfos()
+ 1);
pNewLeaderHeadInfo->setType(szBuffer);
pNewLeaderHeadInfo->setText(GC.getHeroInfo(eHero).getText());
@@ -11864,23 +12014,30 @@
if (-1 == iIndex)
{
- GC.getLeaderHeadInfo().push_back(pNewLeaderHeadInfo);
+ GC.getRandomLeaderInfo().push_back(pNewLeaderHeadInfo);
if (NULL != pNewLeaderHeadInfo->getType())
{
- GC.setInfoTypeFromString(pNewLeaderHeadInfo->getType(),
(int)GC.getLeaderHeadInfo().size() - 1); // add type to global info type
hash map
+ GC.setInfoTypeFromString(pNewLeaderHeadInfo->getType(),
(int)GC.getRandomLeaderInfo().size() - 1); // add type to global info type
hash map
}
}
else
{
- SAFE_DELETE((GC.getLeaderHeadInfo())[iIndex]);
- (GC.getLeaderHeadInfo())[iIndex] = pNewLeaderHeadInfo;
+ SAFE_DELETE((GC.getRandomLeaderInfo())[iIndex]);
+ (GC.getRandomLeaderInfo())[iIndex] = pNewLeaderHeadInfo;
}
- iIndex = GC.getInfoTypeForString(pNewLeaderHeadInfo->getType());
+ iIndex = GC.getInfoTypeForString(pNewLeaderHeadInfo->getType()) +
GC.getNumLeaderHeadInfos();
GC.getHeroInfo(eHero).setLeaderType(iIndex);
-
GC.getCivilizationInfo(GET_PLAYER(ePlayer).getCivilizationType()).pushNewLeader(iIndex);
+
GC.getCivilizationInfo(GET_PLAYER(ePlayer).getCivilizationType()).pushNewLeader(iIndex,
false);
+ for (int iI = 0; iI < GC.getNumCivilizationInfos(); iI++)
+ {
+ if (iI != GET_PLAYER(ePlayer).getCivilizationType())
+ {
+ GC.getCivilizationInfo((CivilizationTypes)iI).pushNewLeader(iIndex,
true);
+ }
+ }
return (LeaderHeadTypes)iIndex;
}
@@ -12102,9 +12259,8 @@
CvUnit* pHeroUnit =
GET_PLAYER(ePlayer).getUnit(getHeroUnitID(eHero));
if (pHeroUnit->isCoreTroop())
{
- pHeroUnit = pHeroUnit->dismissLegion();
- FAssert (pHeroUnit != NULL);
- if (bKillUnit)
+ pHeroUnit = pHeroUnit->dismissLegion(true);
+ if (bKillUnit && pHeroUnit != NULL)
{
pHeroUnit->kill(false);
}
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGame.h Sun Sep 27
18:36:06 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGame.h Tue Sep 29
23:51:43 2009
@@ -568,7 +568,7 @@
void setHeroUnitCombatLevel(HeroTypes eHero, UnitCombatTypes
eUnitCombat, int iNewValue); // Exposed to Python
void changeHeroUnitCombatLevel(HeroTypes eHero, UnitCombatTypes
eUnitCombat, int iChange); // Exposed to Python
int getHeroPromotionStatus(HeroTypes eHero, PromotionTypes ePromotion)
const; // Exposed to Python
- void setHeroPromotionStatus(HeroTypes eHero, PromotionTypes
ePromotion, int iNewValue); // Exposed to Python
+ void setHeroPromotionStatus(HeroTypes eHero, PromotionTypes
ePromotion, int iNewValue, bool bFromNineTransformation = false); //
Exposed to Python
int getHeroUnitID(HeroTypes eHero) const; // Exposed to Python
void setHeroUnitID(HeroTypes eHero, int iID); // Exposed to Python
float getHeroExperience(HeroTypes eHero) const; // Exposed to
Python
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGameTextMgr.cpp
Tue Sep 22 03:53:27 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGameTextMgr.cpp
Tue Sep 29 23:51:43 2009
@@ -2036,6 +2036,29 @@
case DOMAIN_LAND:
bValid = !(pPlot->isWater());
+
+ // Sanguo Mod Danyang Armies, start, by poyzuhe 09.29.09
+ if (!bValid)
+ {
+ int iOdds;
+
+ pAttacker =
gDLL->getInterfaceIFace()->getSelectionList()->AI_getBestGroupAttacker(pPlot,
false, iOdds);
+
+ if (pAttacker == NULL)
+ {
+ pAttacker =
gDLL->getInterfaceIFace()->getSelectionList()->AI_getBestGroupAttacker(pPlot,
false, iOdds, true);
+ }
+
+ if (pAttacker != NULL)
+ {
+ if (pAttacker->getUnitInfo().isCanMoveAllTerrain())
+ {
+ bValid = true;
+ }
+ }
+ }
+ // Sanguo Mod Danyang Armies, end
+
break;
case DOMAIN_IMMOBILE:
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGlobals.cpp Fri
Sep 11 07:14:16 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGlobals.cpp Tue
Sep 29 23:51:43 2009
@@ -1191,8 +1191,18 @@
CvLeaderHeadInfo& CvGlobals::getLeaderHeadInfo(LeaderHeadTypes
eLeaderHeadNum)
{
FAssert(eLeaderHeadNum > -1);
- FAssert(eLeaderHeadNum < GC.getNumLeaderHeadInfos());
- return *(m_paLeaderHeadInfo[eLeaderHeadNum]);
+ // Sanguo Mod Random Leader, start, by poyuzhe 09.30.09
+ //FAssert(eLeaderHeadNum < GC.getNumLeaderHeadInfos());
+ //return *(m_paLeaderHeadInfo[eLeaderHeadNum]);
+ FAssert(eLeaderHeadNum < (GC.getNumLeaderHeadInfos() +
GC.getNumRandomLeaderInfos()));
+ if (eLeaderHeadNum < GC.getNumLeaderHeadInfos())
+ {
+ return *(m_paLeaderHeadInfo[eLeaderHeadNum]);
+ }
+ else
+ {
+ return *(m_paRandomLeaderInfo[eLeaderHeadNum -
GC.getNumLeaderHeadInfos()]);
+ }
}
@@ -2456,6 +2466,24 @@
FAssert (eSurrenderNum < GC.getNumSurrenderInfos());
return *(m_paSurrenderInfo[eSurrenderNum]);
}
+
+// Random leader
+int CvGlobals::getNumRandomLeaderInfos()
+{
+ return (int)m_paRandomLeaderInfo.size();
+}
+
+std::vector<CvLeaderHeadInfo*>& CvGlobals::getRandomLeaderInfo()
+{
+ return m_paRandomLeaderInfo;
+}
+
+CvLeaderHeadInfo& CvGlobals::getRandomLeaderInfo(RandomLeaderTypes
eRandomLeader)
+{
+ FAssert (eRandomLeader > -1);
+ FAssert (eRandomLeader < GC.getNumRandomLeaderInfos());
+ return *(m_paRandomLeaderInfo[eRandomLeader]);
+}
// Sanguo Mod XML, end
int& CvGlobals::getNumEntityEventTypes()
@@ -3156,16 +3184,34 @@
int CvGlobals::getUSE_ON_UNIT_SELECTED_CALLBACK()
{
+ // Sanguo Mod Tutorial, start, by poyuzhe 09.28.09
+ if (GC.getGameINLINE().getTutorialID() > -1)
+ {
+ return 1;
+ }
+ // Sanguo Mod Tutorial, end
return m_iUSE_ON_UNIT_SELECTED_CALLBACK;
}
int CvGlobals::getUSE_ON_UPDATE_CALLBACK()
{
+ // Sanguo Mod Tutorial, start, by poyuzhe 09.28.09
+ if (GC.getGameINLINE().getTutorialID() > -1)
+ {
+ return 1;
+ }
+ // Sanguo Mod Tutorial, end
return m_iUSE_ON_UPDATE_CALLBACK;
}
int CvGlobals::getUSE_ON_UNIT_CREATED_CALLBACK()
{
+ // Sanguo Mod Tutorial, start, by poyuzhe 09.28.09
+ if (GC.getGameINLINE().getTutorialID() > -1)
+ {
+ return 1;
+ }
+ // Sanguo Mod Tutorial, end
return m_iUSE_ON_UNIT_CREATED_CALLBACK;
}
@@ -3593,6 +3639,10 @@
deleteInfoArray(m_paSurrenderInfo);
// Sanguo Mod XML, end
+ // Sanguo MOd Random Leader, start, by poyuzhe 09.30.09
+ deleteInfoArray(m_paRandomLeaderInfo);
+ // Sanguo Mod Random Leader, end
+
clearTypesMap();
m_aInfoVectors.clear();
}
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGlobals.h Fri Sep
11 07:14:16 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvGlobals.h Tue Sep
29 23:51:43 2009
@@ -646,6 +646,12 @@
CvSurrenderInfo& getSurrenderInfo(SurrenderTypes eSurrender);
// Sanguo Mod XML, end
+ // Random Leader, start, by poyuzhe 09.30.09
+ int getNumRandomLeaderInfos();
+ std::vector<CvLeaderHeadInfo*>& getRandomLeaderInfo();
+ CvLeaderHeadInfo& getRandomLeaderInfo(RandomLeaderTypes eRandomLeader);
+ // Random Leader, end
+
//
// Global Types
// All type strings are upper case and are kept in this hash map for fast
lookup
@@ -1108,6 +1114,10 @@
std::vector<CvSurrenderInfo*> m_paSurrenderInfo;
// Sanguo Mod XML, end
+ // Random Leader, start, by poyuzhe 09.30.09
+ std::vector<CvLeaderHeadInfo*> m_paRandomLeaderInfo;
+ // Random Leader, end
+
// Game Text
std::vector<CvGameText*> m_paGameTextXML;
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvInfos.cpp Sun Sep
27 18:36:06 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvInfos.cpp Tue Sep
29 23:51:43 2009
@@ -10270,7 +10270,10 @@
bool CvCivilizationInfo::isLeaders(int i) const
{
- FAssertMsg(i < GC.getNumLeaderHeadInfos(), "Index out of bounds");
+ // Sanguo Mod Hero, start, added by poyuzhe 03.06.09
+ //FAssertMsg(i < GC.getNumLeaderHeadInfos(), "Index out of bounds");
+ FAssertMsg(i < GC.getNumLeaderHeadInfos() +
GC.getNumRandomLeaderInfos(), "Index out of bounds");
+ // Sanguo Mod Hero, end
FAssertMsg(i > -1, "Index out of bounds");
// Sanguo Mod Hero, start, added by poyuzhe 03.06.09
// return m_pbLeaders ? m_pbLeaders[i] : false;
@@ -10336,11 +10339,12 @@
}
// Sanguo Mod random hero, start, by poyuzhe 09.19.09
-void CvCivilizationInfo::pushNewLeader(int i)
-{
+void CvCivilizationInfo::pushNewLeader(int i, bool bExtendOnly)
+{
+ FAssert (i == GC.getNumLeaderHeadInfos() + GC.getNumRandomLeaderInfos() -
1);
std::vector<bool> aTempList;
int iCount = 0;
- for (int iI = 0; iI < GC.getNumLeaderHeadInfos() - 1; iI++)
+ for (int iI = 0; iI < GC.getNumLeaderHeadInfos() +
GC.getNumRandomLeaderInfos() - 1; iI++)
{
aTempList.push_back(m_piLeaders[iI]);
if (m_piLeaders[iI] > 0)
@@ -10349,12 +10353,19 @@
}
}
SAFE_DELETE_ARRAY(m_piLeaders);
- m_piLeaders = new int[GC.getNumLeaderHeadInfos()];
- for (int iI = 0; iI < GC.getNumLeaderHeadInfos() - 1; iI++)
+ m_piLeaders = new int[GC.getNumLeaderHeadInfos() +
GC.getNumRandomLeaderInfos()];
+ for (int iI = 0; iI < GC.getNumLeaderHeadInfos() +
GC.getNumRandomLeaderInfos() - 1; iI++)
{
m_piLeaders[iI] = aTempList[iI];
}
- m_piLeaders[i] = iCount + 1;
+ if (!bExtendOnly)
+ {
+ m_piLeaders[i] = iCount + 1;
+ }
+ else
+ {
+ m_piLeaders[i] = 0;
+ }
aTempList.clear();
}
@@ -10410,8 +10421,8 @@
// m_pbLeaders = new bool[GC.getNumLeaderHeadInfos()];
// stream->Read(GC.getNumLeaderHeadInfos(), m_pbLeaders);
SAFE_DELETE_ARRAY(m_piLeaders);
- m_piLeaders = new int[GC.getNumLeaderHeadInfos()];
- stream->Read(GC.getNumLeaderHeadInfos(), m_piLeaders);
+ m_piLeaders = new int[GC.getNumLeaderHeadInfos() +
GC.getNumRandomLeaderInfos()];
+ stream->Read(GC.getNumLeaderHeadInfos() + GC.getNumRandomLeaderInfos(),
m_piLeaders);
// Sanguo Mod Hero, end
SAFE_DELETE_ARRAY(m_pbCivilizationFreeBuildingClass);
@@ -10466,7 +10477,7 @@
stream->Write(GC.getNumCivicOptionInfos(), m_piCivilizationInitialCivics);
// Sanguo Mod Hero, start, added by poyuzhe 03.06.09
// stream->Write(GC.getNumLeaderHeadInfos(), m_pbLeaders);
- stream->Write(GC.getNumLeaderHeadInfos(), m_piLeaders);
+ stream->Write(GC.getNumLeaderHeadInfos() + GC.getNumRandomLeaderInfos(),
m_piLeaders);
// Sanguo Mod Hero, end
stream->Write(GC.getNumBuildingClassInfos(),
m_pbCivilizationFreeBuildingClass);
stream->Write(GC.getNumTechInfos(), m_pbCivilizationFreeTechs);
@@ -15422,6 +15433,74 @@
}
}
+void CvLeaderHeadInfo::initRandomLeader()
+{
+ SAFE_DELETE_ARRAY(m_pbTraits);
+ SAFE_DELETE_ARRAY(m_piFlavorValue);
+ SAFE_DELETE_ARRAY(m_piContactRand);
+ SAFE_DELETE_ARRAY(m_piContactDelay);
+ SAFE_DELETE_ARRAY(m_piMemoryDecayRand);
+ SAFE_DELETE_ARRAY(m_piMemoryAttitudePercent);
+ SAFE_DELETE_ARRAY(m_piNoWarAttitudeProb);
+ SAFE_DELETE_ARRAY(m_piUnitAIWeightModifier);
+ SAFE_DELETE_ARRAY(m_piImprovementWeightModifier);
+ SAFE_DELETE_ARRAY(m_piDiploPeaceIntroMusicScriptIds);
+ SAFE_DELETE_ARRAY(m_piDiploPeaceMusicScriptIds);
+ SAFE_DELETE_ARRAY(m_piDiploWarIntroMusicScriptIds);
+ SAFE_DELETE_ARRAY(m_piDiploWarMusicScriptIds);
+
+ int iI;
+ m_pbTraits = new bool[GC.getNumTraitInfos()];
+ for(iI=0; iI<GC.getNumTraitInfos(); iI++)
+ {
+ m_pbTraits[iI]=false;
+ }
+ m_piFlavorValue = new int[GC.getNumFlavorTypes()];
+ for (iI=0;iI<GC.getNumFlavorTypes();iI++)
+ {
+ m_piFlavorValue[iI]=-1;
+ }
+ m_piContactRand = new int[NUM_CONTACT_TYPES];
+ m_piContactDelay = new int[NUM_CONTACT_TYPES];
+ for(iI=0;iI<NUM_CONTACT_TYPES;iI++)
+ {
+ m_piContactRand[iI]=-1;
+ m_piContactDelay[iI]=-1;
+ }
+ m_piMemoryDecayRand = new int[NUM_MEMORY_TYPES];
+ m_piMemoryAttitudePercent = new int[NUM_MEMORY_TYPES];
+ for(iI=0;iI<NUM_MEMORY_TYPES;iI++)
+ {
+ m_piMemoryDecayRand[iI]=-1;
+ m_piMemoryAttitudePercent[iI]=-1;
+ }
+ m_piNoWarAttitudeProb = new int[NUM_ATTITUDE_TYPES];
+ for(iI=0;iI<NUM_ATTITUDE_TYPES;iI++)
+ {
+ m_piNoWarAttitudeProb[iI]=-1;
+ }
+ m_piUnitAIWeightModifier = new int[NUM_UNITAI_TYPES];
+ for(iI=0;iI<NUM_UNITAI_TYPES;iI++)
+ {
+ m_piUnitAIWeightModifier[iI]=-1;
+ }
+ m_piImprovementWeightModifier = new int[GC.getNumImprovementInfos()];
+ for(iI=0;iI<GC.getNumImprovementInfos();iI++)
+ {
+ m_piImprovementWeightModifier[iI]=-1;
+ }
+ m_piDiploPeaceIntroMusicScriptIds = new int[GC.getNumEraInfos()];
+ m_piDiploPeaceMusicScriptIds = new int[GC.getNumEraInfos()];
+ m_piDiploWarIntroMusicScriptIds = new int[GC.getNumEraInfos()];
+ m_piDiploWarMusicScriptIds = new int[GC.getNumEraInfos()];
+ for(iI=0;iI<GC.getNumEraInfos();iI++)
+ {
+ m_piDiploWarMusicScriptIds[iI]=-1;
+ m_piDiploWarIntroMusicScriptIds[iI]=-1;
+ m_piDiploPeaceMusicScriptIds[iI]=-1;
+ m_piDiploPeaceIntroMusicScriptIds[iI]=-1;
+ }
+}
// Sanguo Mod end
// Arrays
@@ -15647,58 +15726,55 @@
// Sanguo Mod random leader, start, by poyuzhe 09.20.09
stream->Read(&m_bRandom);
stream->ReadString(m_szPortrait);
-
- if (!isRandom())
- {
- SAFE_DELETE_ARRAY(m_piFlavorValue);
- m_piFlavorValue = new int[GC.getNumFlavorTypes()];
- stream->Read(GC.getNumFlavorTypes(), m_piFlavorValue);
-
- SAFE_DELETE_ARRAY(m_piContactRand);
- m_piContactRand = new int[NUM_CONTACT_TYPES];
- stream->Read(NUM_CONTACT_TYPES, m_piContactRand);
-
- SAFE_DELETE_ARRAY(m_piContactDelay);
- m_piContactDelay = new int[NUM_CONTACT_TYPES];
- stream->Read(NUM_CONTACT_TYPES, m_piContactDelay);
-
- SAFE_DELETE_ARRAY(m_piMemoryDecayRand);
- m_piMemoryDecayRand = new int[NUM_MEMORY_TYPES];
- stream->Read(NUM_MEMORY_TYPES, m_piMemoryDecayRand);
-
- SAFE_DELETE_ARRAY(m_piMemoryAttitudePercent);
- m_piMemoryAttitudePercent = new int[NUM_MEMORY_TYPES];
- stream->Read(NUM_MEMORY_TYPES, m_piMemoryAttitudePercent);
-
- SAFE_DELETE_ARRAY(m_piNoWarAttitudeProb);
- m_piNoWarAttitudeProb = new int[NUM_ATTITUDE_TYPES];
- stream->Read(NUM_ATTITUDE_TYPES, m_piNoWarAttitudeProb);
-
- SAFE_DELETE_ARRAY(m_piUnitAIWeightModifier);
- m_piUnitAIWeightModifier = new int[NUM_UNITAI_TYPES];
- stream->Read(NUM_UNITAI_TYPES, m_piUnitAIWeightModifier);
-
- SAFE_DELETE_ARRAY(m_piImprovementWeightModifier);
- m_piImprovementWeightModifier = new int[GC.getNumImprovementInfos()];
- stream->Read(GC.getNumImprovementInfos(),
m_piImprovementWeightModifier);
-
- SAFE_DELETE_ARRAY(m_piDiploPeaceIntroMusicScriptIds);
- m_piDiploPeaceIntroMusicScriptIds = new int[GC.getNumEraInfos()];
- stream->Read(GC.getNumEraInfos(), m_piDiploPeaceIntroMusicScriptIds);
-
- SAFE_DELETE_ARRAY(m_piDiploPeaceMusicScriptIds);
- m_piDiploPeaceMusicScriptIds = new int[GC.getNumEraInfos()];
- stream->Read(GC.getNumEraInfos(), m_piDiploPeaceMusicScriptIds);
-
- SAFE_DELETE_ARRAY(m_piDiploWarIntroMusicScriptIds);
- m_piDiploWarIntroMusicScriptIds = new int[GC.getNumEraInfos()];
- stream->Read(GC.getNumEraInfos(), m_piDiploWarIntroMusicScriptIds);
-
- SAFE_DELETE_ARRAY(m_piDiploWarMusicScriptIds);
- m_piDiploWarMusicScriptIds = new int[GC.getNumEraInfos()];
- stream->Read(GC.getNumEraInfos(), m_piDiploWarMusicScriptIds);
- }
- // Sanguo Mod random leader, end
+ // Sanguo Mod random leader, end
+
+ SAFE_DELETE_ARRAY(m_piFlavorValue);
+ m_piFlavorValue = new int[GC.getNumFlavorTypes()];
+ stream->Read(GC.getNumFlavorTypes(), m_piFlavorValue);
+
+ SAFE_DELETE_ARRAY(m_piContactRand);
+ m_piContactRand = new int[NUM_CONTACT_TYPES];
+ stream->Read(NUM_CONTACT_TYPES, m_piContactRand);
+
+ SAFE_DELETE_ARRAY(m_piContactDelay);
+ m_piContactDelay = new int[NUM_CONTACT_TYPES];
+ stream->Read(NUM_CONTACT_TYPES, m_piContactDelay);
+
+ SAFE_DELETE_ARRAY(m_piMemoryDecayRand);
+ m_piMemoryDecayRand = new int[NUM_MEMORY_TYPES];
+ stream->Read(NUM_MEMORY_TYPES, m_piMemoryDecayRand);
+
+ SAFE_DELETE_ARRAY(m_piMemoryAttitudePercent);
+ m_piMemoryAttitudePercent = new int[NUM_MEMORY_TYPES];
+ stream->Read(NUM_MEMORY_TYPES, m_piMemoryAttitudePercent);
+
+ SAFE_DELETE_ARRAY(m_piNoWarAttitudeProb);
+ m_piNoWarAttitudeProb = new int[NUM_ATTITUDE_TYPES];
+ stream->Read(NUM_ATTITUDE_TYPES, m_piNoWarAttitudeProb);
+
+ SAFE_DELETE_ARRAY(m_piUnitAIWeightModifier);
+ m_piUnitAIWeightModifier = new int[NUM_UNITAI_TYPES];
+ stream->Read(NUM_UNITAI_TYPES, m_piUnitAIWeightModifier);
+
+ SAFE_DELETE_ARRAY(m_piImprovementWeightModifier);
+ m_piImprovementWeightModifier = new int[GC.getNumImprovementInfos()];
+ stream->Read(GC.getNumImprovementInfos(),
m_piImprovementWeightModifier);
+
+ SAFE_DELETE_ARRAY(m_piDiploPeaceIntroMusicScriptIds);
+ m_piDiploPeaceIntroMusicScriptIds = new int[GC.getNumEraInfos()];
+ stream->Read(GC.getNumEraInfos(), m_piDiploPeaceIntroMusicScriptIds);
+
+ SAFE_DELETE_ARRAY(m_piDiploPeaceMusicScriptIds);
+ m_piDiploPeaceMusicScriptIds = new int[GC.getNumEraInfos()];
+ stream->Read(GC.getNumEraInfos(), m_piDiploPeaceMusicScriptIds);
+
+ SAFE_DELETE_ARRAY(m_piDiploWarIntroMusicScriptIds);
+ m_piDiploWarIntroMusicScriptIds = new int[GC.getNumEraInfos()];
+ stream->Read(GC.getNumEraInfos(), m_piDiploWarIntroMusicScriptIds);
+
+ SAFE_DELETE_ARRAY(m_piDiploWarMusicScriptIds);
+ m_piDiploWarMusicScriptIds = new int[GC.getNumEraInfos()];
+ stream->Read(GC.getNumEraInfos(), m_piDiploWarMusicScriptIds);
}
void CvLeaderHeadInfo::write(FDataStreamBase* stream)
@@ -15806,21 +15882,20 @@
// Sanguo Mod random leader, start, by poyuzhe 09.20.09
stream->Write(m_bRandom);
stream->WriteString(m_szPortrait);
- if (!isRandom())
- {
- stream->Write(GC.getNumFlavorTypes(), m_piFlavorValue);
- stream->Write(NUM_CONTACT_TYPES, m_piContactRand);
- stream->Write(NUM_CONTACT_TYPES, m_piContactDelay);
- stream->Write(NUM_MEMORY_TYPES, m_piMemoryDecayRand);
- stream->Write(NUM_MEMORY_TYPES, m_piMemoryAttitudePercent);
- stream->Write(NUM_ATTITUDE_TYPES, m_piNoWarAttitudeProb);
- stream->Write(NUM_UNITAI_TYPES, m_piUnitAIWeightModifier);
- stream->Write(GC.getNumImprovementInfos(),
m_piImprovementWeightModifier);
- stream->Write(GC.getNumEraInfos(), m_piDiploPeaceIntroMusicScriptIds);
- stream->Write(GC.getNumEraInfos(), m_piDiploPeaceMusicScriptIds);
- stream->Write(GC.getNumEraInfos(), m_piDiploWarIntroMusicScriptIds);
- stream->Write(GC.getNumEraInfos(), m_piDiploWarMusicScriptIds);
- }
+ // Sanguo Mod random leader, end
+
+ stream->Write(GC.getNumFlavorTypes(), m_piFlavorValue);
+ stream->Write(NUM_CONTACT_TYPES, m_piContactRand);
+ stream->Write(NUM_CONTACT_TYPES, m_piContactDelay);
+ stream->Write(NUM_MEMORY_TYPES, m_piMemoryDecayRand);
+ stream->Write(NUM_MEMORY_TYPES, m_piMemoryAttitudePercent);
+ stream->Write(NUM_ATTITUDE_TYPES, m_piNoWarAttitudeProb);
+ stream->Write(NUM_UNITAI_TYPES, m_piUnitAIWeightModifier);
+ stream->Write(GC.getNumImprovementInfos(),
m_piImprovementWeightModifier);
+ stream->Write(GC.getNumEraInfos(), m_piDiploPeaceIntroMusicScriptIds);
+ stream->Write(GC.getNumEraInfos(), m_piDiploPeaceMusicScriptIds);
+ stream->Write(GC.getNumEraInfos(), m_piDiploWarIntroMusicScriptIds);
+ stream->Write(GC.getNumEraInfos(), m_piDiploWarMusicScriptIds);
}
const CvArtInfoLeaderhead* CvLeaderHeadInfo::getArtInfo() const
@@ -20915,14 +20990,20 @@
{
FAssertMsg(i < getNumResponses(), "Index out of bounds");
FAssertMsg(i > -1, "Index out of bounds");
- FAssertMsg(j < GC.getNumLeaderHeadInfos(), "Index out of bounds");
+
+ // Sanguo Mod random leader,start
+ FAssertMsg(j < GC.getNumLeaderHeadInfos() +
GC.getNumRandomLeaderInfos(), "Index out of bounds");
+ // Sanguo Mod random leader, end
+
FAssertMsg(j > -1, "Index out of bounds");
+
// Sanguo Mod random leader, start, by poyuzhe 09.20.09
if (GC.getLeaderHeadInfo((LeaderHeadTypes)j).isRandom())
{
return true;
}
// Sanguo Mod random leader, end
+
return m_pResponses[i].m_pbLeaderHeadTypes[j];
}
@@ -20977,7 +21058,8 @@
{
if((int)aTempList.size() > iI)
{
- m_pbLeaderHeadTypes[iI] = aTempList[iI];
+ //m_pbLeaderHeadTypes[iI] = aTempList[iI];
+ m_pbLeaderHeadTypes[iI] = true;
}
else
{
@@ -21019,7 +21101,7 @@
stream->Write(GC.getNumCivilizationInfos(), m_pbCivilizationTypes);
// Sanguo Mod random leader, start, by poyuzhe 09.20.09
- reInitLeaderHead();
+ // reInitLeaderHead();
// Sanguo Mod random leader, end
stream->Write(GC.getNumLeaderHeadInfos(), m_pbLeaderHeadTypes);
stream->Write(NUM_ATTITUDE_TYPES, m_pbAttitudeTypes);
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvInfos.h Fri Sep 25
08:21:08 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvInfos.h Tue Sep 29
23:51:43 2009
@@ -2417,7 +2417,7 @@
// Sanguo Mod Hero, end
// Sanguo Mod random hero, start, by poyuzhe 09.19.09
- void pushNewLeader(int i);
+ void pushNewLeader(int i, bool bExtendOnly);
// Sanguo Mod random hero, end
DllExport bool isCivilizationFreeBuildingClass(int i) const; //
Exposed to Python
@@ -3859,6 +3859,7 @@
void setFavoriteReligion(int i);
void setFavoriteCivic(int i);
void setHasTrait(int i, bool bNewValue);
+ void initRandomLeader();
// Sanguo Mod random leader, end
// Arrays
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvPlayer.cpp Sun Sep
27 18:36:06 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvPlayer.cpp Tue Sep
29 23:51:43 2009
@@ -37,6 +37,7 @@
/** General
AI
*/
/*************************************************************************************************/
#include "CvDLLFlagEntityIFaceBase.h"
+#include "Math.h"
/*************************************************************************************************/
/** BETTER_BTS_AI_MOD
END */
/*************************************************************************************************/
@@ -3977,8 +3978,11 @@
{
CvWString szBuffer = gDLL->getText("TXT_KEY_HERO_PERSUADED",
GC.getHeroInfo(eHero).getDescription());
gDLL->getInterfaceIFace()->addMessage(getID(), false,
GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_UNIT_GREATPEOPLE",
MESSAGE_TYPE_MAJOR_EVENT, GC.getHeroInfo(eHero).getButton(),
(ColorTypes)GC.getInfoTypeForString("COLOR_UNIT_TEXT"), iX, iY, true, true);
- szBuffer = gDLL->getText("TXT_KEY_HERO_BETRAYED",
GC.getHeroInfo(eHero).getDescription(), getCivilizationDescription());
- gDLL->getInterfaceIFace()->addMessage(ePlayer, false,
GC.getEVENT_MESSAGE_TIME(), szBuffer,
GC.getEraInfo(GC.getGameINLINE().getCurrentEra()).getAudioUnitDefeatScript(),
MESSAGE_TYPE_INFO, GC.getHeroInfo(eHero).getButton(),
(ColorTypes)GC.getInfoTypeForString("COLOR_WARNING_TEXT"));
+ if (GET_PLAYER(ePlayer).isAlive())
+ {
+ szBuffer = gDLL->getText("TXT_KEY_HERO_BETRAYED",
GC.getHeroInfo(eHero).getDescription(), getCivilizationDescription());
+ gDLL->getInterfaceIFace()->addMessage(ePlayer, false,
GC.getEVENT_MESSAGE_TIME(), szBuffer,
GC.getEraInfo(GC.getGameINLINE().getCurrentEra()).getAudioUnitDefeatScript(),
MESSAGE_TYPE_INFO, GC.getHeroInfo(eHero).getButton(),
(ColorTypes)GC.getInfoTypeForString("COLOR_WARNING_TEXT"));
+ }
}
GC.getGameINLINE().setHeroCapturePlayer(eHero, NO_PLAYER);
@@ -4188,15 +4192,64 @@
return false;
}
- if (GC.getGameINLINE().getElapsedGameTurns() == 0)
+ /*if (GC.getGameINLINE().getElapsedGameTurns() == 0)
{
return false;
- }
+ }*/
return true;
}
// Sanguo Mod Tutorial, end
+// Sanguo Mod Performance, start, by poyuzhe 09.28.09
+int CvPlayer::getScoreComponent(int iRawScore, int iInitial, int iMax, int
iFactor, bool bExponential, bool bFinal, bool bVictory) const
+{
+ if (GC.getGameINLINE().getEstimateEndTurn() == 0)
+ {
+ return 0;
+ }
+ float fTurnRatio;
+ float fMax;
+
+ if (bFinal && bVictory)
+ {
+ fTurnRatio = (float)(GC.getGameINLINE().getGameTurn()) /
(float)(GC.getGameINLINE().getEstimateEndTurn());
+ }
+ if (bExponential && (iInitial != 0))
+ {
+ float fRatio = (float)iMax / (float)iInitial;
+ fMax = iInitial * pow(fRatio, fTurnRatio);
+ }
+ else
+ {
+ fMax = iInitial + fTurnRatio * (iMax - iInitial);
+ }
+
+ float iFree = (GC.getDefineINT("SCORE_FREE_PERCENT") * fMax) / 100;
+ float iScore;
+ if ((iFree + fMax) != 0)
+ {
+ iScore = (iFactor * (iRawScore + iFree)) / (iFree + fMax);
+ }
+ else
+ {
+ iScore = (float)iFactor;
+ }
+
+ if (bVictory)
+ {
+ iScore = ((100 + GC.getDefineINT("SCORE_VICTORY_PERCENT")) * iScore) /
100;
+ }
+
+ if (bFinal)
+ {
+ iScore = ((100 + GC.getDefineINT("SCORE_HANDICAP_PERCENT_OFFSET") +
(GC.getGameINLINE().getHandicapType() *
GC.getDefineINT("SCORE_HANDICAP_PERCENT_PER"))) * iScore) / 100;
+ }
+
+ return (int)iScore;
+}
+// Sanguo Mod Performance, end
+
/*************************************************************************************************/
/** AI_AUTO_PLAY_MOD
07/09/08 jdog5000 */
/**
*/
@@ -5062,6 +5115,12 @@
{
return 0;
}
+
+ /*int iPopulationScore = getScoreComponent(getPopScore(),
GC.getGameINLINE().getInitPopulation(),
GC.getGameINLINE().getMaxPopulation(),
GC.getDefineINT("SCORE_POPULATION_FACTOR"), true, bFinal, bVictory);
+ int iLandScore = getScoreComponent(getLandScore(),
GC.getGameINLINE().getInitLand(), GC.getGameINLINE().getMaxLand(),
GC.getDefineINT("SCORE_LAND_FACTOR"), true, bFinal, bVictory);
+ int iTechScore = getScoreComponent(getTechScore(),
GC.getGameINLINE().getInitTech(), GC.getGameINLINE().getMaxTech(),
GC.getDefineINT("SCORE_TECH_FACTOR"), true, bFinal, bVictory);
+ int iWondersScore = getScoreComponent(getWondersScore(),
GC.getGameINLINE().getInitWonders(), GC.getGameINLINE().getMaxWonders(),
GC.getDefineINT("SCORE_WONDER_FACTOR"), false, bFinal, bVictory);
+ return (iPopulationScore + iLandScore + iWondersScore + iTechScore);*/
long lScore = 0;
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvPlayer.h Sun Sep
27 18:36:06 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvPlayer.h Tue Sep
29 23:51:43 2009
@@ -1091,6 +1091,10 @@
bool isFeatPopup() const;
// Sanguo Mod Tutorial, end
+ // Sanguo Mod Performance, start, by poyuzhe 09.28.09
+ int getScoreComponent(int iRawScore, int iInitial, int iMax, int iFactor,
bool bExponential, bool bFinal, bool bVictory) const;
+ // Sanguo Mod Performance, end
+
virtual void AI_init() = 0;
virtual void AI_reset(bool bConstructor) = 0;
virtual void AI_doTurnPre() = 0;
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvPlayerAI.cpp Sun
Sep 27 18:36:06 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvPlayerAI.cpp Tue
Sep 29 23:51:43 2009
@@ -20054,7 +20054,7 @@
if (!isHuman())
{
int iRand = GC.getGameINLINE().getSorenRandNum(100, "deal
with hero");
- if (GC.getHeroInfo((HeroTypes)iI).getMurdererCiv() ==
getCivilizationType())
+ if (GC.getHeroInfo((HeroTypes)iI).getMurdererCiv() ==
getCivilizationType()
&& !GC.getGameINLINE().isOption(GAMEOPTION_NO_HERO_EXECUTION))
{
executeHero((HeroTypes)iI);
}
@@ -20067,7 +20067,7 @@
}
else if
(GC.getSurrenderInfo((SurrenderTypes)GC.getHeroInfo((HeroTypes)iI).getSurrenderType()).getNeverSurrenderToFaction()
== getCivilizationType() ||
GC.getSurrenderInfo((SurrenderTypes)GC.getHeroInfo((HeroTypes)iI).getSurrenderType()).getNeverSurrenderToLeader()
== getPersonalityType())
{
- if (iRand < 30)
+ if (iRand <
(GC.getGameINLINE().isOption(GAMEOPTION_HIGH_HERO_DEATH_CHANCE) ? 60 : 30)
&& !GC.getGameINLINE().isOption(GAMEOPTION_NO_HERO_EXECUTION))
{
executeHero((HeroTypes)iI);
}
@@ -20078,7 +20078,7 @@
}
else if
(GC.getHeroInfo((HeroTypes)iI).getCivilizationLoyalty(getID()) < 80)
{
- if (iRand < 15)
+ if (iRand <
(GC.getGameINLINE().isOption(GAMEOPTION_HIGH_HERO_DEATH_CHANCE) ? 30 : 15)
&& !GC.getGameINLINE().isOption(GAMEOPTION_NO_HERO_EXECUTION))
{
executeHero((HeroTypes)iI);
}
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvSelectionGroup.cpp
Sun Sep 27 18:36:06 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvSelectionGroup.cpp
Tue Sep 29 23:51:43 2009
@@ -1064,30 +1064,50 @@
}
break;
case MISSION_FORM_ADVANCED_LEGION:
+ if (!GC.getGameINLINE().isOption(GAMEOPTION_ENABLE_ARMY))
+ {
+ return false;
+ }
if ((!pLoopUnit->isHuman() || pLoopUnit ==
gDLL->getInterfaceIFace()->getHeadSelectedUnit()) &&
pLoopUnit->canFormAdvancedLegion(pPlot))
{
return true;
}
break;
case MISSION_JOIN_ADVANCED_LEGION:
+ if (!GC.getGameINLINE().isOption(GAMEOPTION_ENABLE_ARMY))
+ {
+ return false;
+ }
if ((!pLoopUnit->isHuman() || pLoopUnit ==
gDLL->getInterfaceIFace()->getHeadSelectedUnit()) &&
pLoopUnit->canJoinAdvancedLegion(pPlot))
{
return true;
}
break;
case MISSION_REGROUP_ADVANCED_LEGION:
+ if (!GC.getGameINLINE().isOption(GAMEOPTION_ENABLE_ARMY))
+ {
+ return false;
+ }
if ((!pLoopUnit->isHuman() || pLoopUnit ==
gDLL->getInterfaceIFace()->getHeadSelectedUnit()) &&
pLoopUnit->canRegroupAdvancedLegion(pPlot))
{
return true;
}
break;
case MISSION_DISMISS_ADVANCED_LEGION:
+ if (!GC.getGameINLINE().isOption(GAMEOPTION_ENABLE_ARMY))
+ {
+ return false;
+ }
if ((!pLoopUnit->isHuman() || pLoopUnit ==
gDLL->getInterfaceIFace()->getHeadSelectedUnit()) &&
pLoopUnit->canDismissAdvancedLegion())
{
return true;
}
break;
case MISSION_QUIT_ADVANCED_LEGION:
+ if (!GC.getGameINLINE().isOption(GAMEOPTION_ENABLE_ARMY))
+ {
+ return false;
+ }
if ((!pLoopUnit->isHuman() || pLoopUnit ==
gDLL->getInterfaceIFace()->getHeadSelectedUnit()) &&
pLoopUnit->canQuitAdvancedLegion())
{
return true;
@@ -1556,37 +1576,37 @@
}
break;
case MISSION_NINE_TRANSFORMATION:
- if (pLoopUnit->nineTransformation())
+ if ((!pLoopUnit->isHuman() || pLoopUnit ==
gDLL->getInterfaceIFace()->getHeadSelectedUnit()) &&
pLoopUnit->nineTransformation())
{
bAction = true;
}
break;
case MISSION_FORM_ADVANCED_LEGION:
- if (pLoopUnit->formAdvancedLegion(false, false))
+ if ((!pLoopUnit->isHuman() || pLoopUnit ==
gDLL->getInterfaceIFace()->getHeadSelectedUnit()) &&
pLoopUnit->formAdvancedLegion(false, false))
{
bAction = true;
}
break;
case MISSION_JOIN_ADVANCED_LEGION:
- if (pLoopUnit->joinAdvancedLegion(-1))
+ if ((!pLoopUnit->isHuman() || pLoopUnit ==
gDLL->getInterfaceIFace()->getHeadSelectedUnit()) &&
pLoopUnit->joinAdvancedLegion(-1))
{
bAction = true;
}
break;
case MISSION_REGROUP_ADVANCED_LEGION:
- if (pLoopUnit->formAdvancedLegion(true, false))
+ if ((!pLoopUnit->isHuman() || pLoopUnit ==
gDLL->getInterfaceIFace()->getHeadSelectedUnit()) &&
pLoopUnit->formAdvancedLegion(true, false))
{
bAction = true;
}
break;
case MISSION_DISMISS_ADVANCED_LEGION:
- if (pLoopUnit->dismissAdvancedLegion())
+ if ((!pLoopUnit->isHuman() || pLoopUnit ==
gDLL->getInterfaceIFace()->getHeadSelectedUnit()) &&
pLoopUnit->dismissAdvancedLegion(false))
{
bAction = true;
}
break;
case MISSION_QUIT_ADVANCED_LEGION:
- if (pLoopUnit->quitAdvancedLegion())
+ if ((!pLoopUnit->isHuman() || pLoopUnit ==
gDLL->getInterfaceIFace()->getHeadSelectedUnit()) &&
pLoopUnit->quitAdvancedLegion(false))
{
bAction = true;
}
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvUnit.cpp Sun Sep
27 18:36:06 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvUnit.cpp Tue Sep
29 23:51:43 2009
@@ -1210,9 +1210,9 @@
if (//!GC.getGameINLINE().isOption(GAMEOPTION_NO_HERO_DEATH_FROM_AGE) &&
GC.getGameINLINE().getGameTurnYear() >
GC.getHeroInfo(getHeroType()).getHistoricalDieYear())
{
- if (GC.getHeroInfo(getHeroType()).getMurdererCiv() == NO_CIVILIZATION |
| GC.getGameINLINE().getGameTurnYear() >
GC.getHeroInfo(getHeroType()).getStartingYear() + 45)
- {
- if (GC.getGameINLINE().getSorenRandNum(100, "Random Vitality
Decrease") <
GC.getDefineINT("HERO_OLD_AGE_DECERASE_VITALITY_CHANCE_PER_TURN"))
+ if (GC.getHeroInfo(getHeroType()).getMurdererCiv() == NO_CIVILIZATION |
| GC.getGameINLINE().getGameTurnYear() >
GC.getHeroInfo(getHeroType()).getStartingYear() +
(GC.getGameINLINE().isOption(GAMEOPTION_HIGH_HERO_DEATH_CHANCE) ? 35 : 45))
+ {
+ if (GC.getGameINLINE().getSorenRandNum(100, "Random Vitality
Decrease") <
GC.getDefineINT("HERO_OLD_AGE_DECERASE_VITALITY_CHANCE_PER_TURN") *
((GC.getGameINLINE().isOption(GAMEOPTION_HIGH_HERO_DEATH_CHANCE)) ? 2 : 1))
{
GC.getGameINLINE().changeHeroVitality(getHeroType(), -1);
}
@@ -15652,6 +15652,7 @@
else
{
HeroTypes eLeaderHero = getLeaderHero();
+ bool bLeaderTroop = isLeaderTroop();
int iAdvancedLegionSize = eLeaderHero != NO_HERO ?
GC.getGameINLINE().getHeroLegionSize(eLeaderHero) : 0;
int iLeaderTroopID = -1;
CvUnit* pLeaderHero = NULL;
@@ -15660,11 +15661,11 @@
{
if (iAdvancedLegionSize > 1)
{
- quitAdvancedLegion();
+ quitAdvancedLegion(true);
}
else
{
- pLeaderHero = dismissAdvancedLegion();
+ pLeaderHero = dismissAdvancedLegion(true);
}
}
GC.getGameINLINE().swapHeroLegionList(getHeroType());
@@ -15678,8 +15679,15 @@
iLeaderTroopID =
GC.getGameINLINE().getHeroCoreTroop(eLeaderHero);
if (iAdvancedLegionSize > 1)
{
- pCoreTroop->joinAdvancedLegion(iLeaderTroopID);
- }
+ if (bLeaderTroop)
+ {
+ pCoreTroop->joinAdvancedLegion(iLeaderTroopID, true);
+ }
+ else
+ {
+ pCoreTroop->joinAdvancedLegion(iLeaderTroopID);
+ }
+ }
else
{
GC.getGameINLINE().addHeroLegionMember(eLeaderHero,
pCoreTroop->getID());
@@ -16033,18 +16041,34 @@
CvUnit* CvUnit::dismissLegion(bool bAttacked)
{
FAssert (getHeroType() >= 0 && getHeroType() < GC.getNumHeroInfos());
- if (getLeaderHero() != NO_HERO)
- {
- quitAdvancedLegion();
+ bool bInArmy = (getLeaderHero() != NO_HERO);
+ PromotionTypes eNineTransformation = bInArmy ?
GC.getGameINLINE().getHeroCurrentNineTransformationPromotion(getHeroType()) :
NO_PROMOTION;
+ if (bInArmy)
+ {
+ quitAdvancedLegion(true);
+ // if legion current sets a nine transformation promotion, then check to
see if after quiting army that nine tranformation promotion is still valid
+ if (eNineTransformation != NO_PROMOTION &&
GC.getGameINLINE().isHeroNineTransformationPromotion(getHeroType(),
eNineTransformation))
+ {
+ eNineTransformation = NO_PROMOTION;
+ }
}
GC.getGameINLINE().backUpHeroLegionMember(getHeroType());
GC.getGameINLINE().clearHeroLegionMember(getHeroType());
CvUnit* pHero = processLegion(true, false, false, bAttacked);
+
+ // only take away nine transformation promotion that is not valid any more
+ if (eNineTransformation != NO_PROMOTION)
+ {
+
GC.getGameINLINE().setHeroCurrentNineTransformationPromotion(pHero->getHeroType(),
NO_PROMOTION);
+ }
#ifndef _DEBUG
- GC.getGameINLINE().setLegionUnitMoved(pHero->getHeroType(), true);
+ if (pHero != NULL)
+ {
+ GC.getGameINLINE().setLegionUnitMoved(pHero->getHeroType(), true);
+ }
#endif
return pHero;
@@ -16154,17 +16178,18 @@
HeroTypes eLeaderHero = pHero->getLeaderHero();
int iAdvancedLegionSize = eLeaderHero != NO_HERO ?
GC.getGameINLINE().getHeroLegionSize(eLeaderHero) : 0;
CvUnit* pLeaderHero = NULL;
+
if (eLeaderHero != NO_HERO)
{
if (iAdvancedLegionSize > 1)
{
- pHero->quitAdvancedLegion();
+ pHero->quitAdvancedLegion(true);
}
else
{
pLeaderHero = pHero->dismissAdvancedLegion();
}
- }
+ }
GC.getGameINLINE().backUpHeroLegionMember(pHero->getHeroType());
GC.getGameINLINE().addHeroLegionMember(pHero->getHeroType(),
getID());
@@ -16293,13 +16318,15 @@
CvUnit* pLeaderHero = NULL;
if (eLeaderHero != NO_HERO)
{
+ // if the Army has more than 1 legion, then temp quit army
if (GC.getGameINLINE().getHeroLegionSize(eLeaderHero) > 1)
{
- pCoreTroop->quitAdvancedLegion();
- }
+ pCoreTroop->quitAdvancedLegion(true);
+ }
+ // else then we are the only legion in army, temp dismiss army
else
{
- pLeaderHero = pCoreTroop->dismissAdvancedLegion();
+ pLeaderHero = pCoreTroop->dismissAdvancedLegion(true);
}
}
@@ -16309,24 +16336,32 @@
if (eLeaderHero != NO_HERO)
{
- if (pLeaderHero == NULL)
- {
- int iUnitID = GC.getGameINLINE().getHeroCoreTroop(eLeaderHero);
- FAssert (pCoreTroop != NULL && pCoreTroop->getHeroType() !=
NO_HERO);
- if (!bLeaderTroop)
- {
- pCoreTroop->joinAdvancedLegion(iUnitID);
- }
- else
- {
- pCoreTroop->joinAdvancedLegion(iUnitID, true);
- }
- }
- else if (pCoreTroop != NULL)
- {
- GC.getGame().swapHeroLegionList(eLeaderHero);
- pLeaderHero->formAdvancedLegion(false, true);
- }
+ if (pCoreTroop != NULL)
+ {
+ if (pLeaderHero == NULL)
+ {
+ // if army is not dismissed
+ int iUnitID = GC.getGameINLINE().getHeroCoreTroop(eLeaderHero);
+ FAssert (pCoreTroop != NULL && pCoreTroop->getHeroType() != NO_HERO);
+ if (!bLeaderTroop)
+ {
+ // if we are not guardian of Army, join as member legion
+ pCoreTroop->joinAdvancedLegion(iUnitID);
+ }
+ else
+ {
+ // join as guardian legion
+ pCoreTroop->joinAdvancedLegion(iUnitID, true);
+ }
+ }
+ else
+ {
+ // eLeaderHero's back up list should have army heroes previous to temp
dismiss army
+ // if pCoreTroop == NULL, which means the legion has 0 member now,
then don't bother to form advanced legion
+ GC.getGame().swapHeroLegionList(eLeaderHero);
+ pLeaderHero->formAdvancedLegion(false, true);
+ }
+ }
}
return true;
@@ -16494,7 +16529,7 @@
{
if
(GC.getGameINLINE().getSorenRandNum(100, "Steal Hero Promotion") <
GC.getDefineINT("HERO_STEAL_PROMOTION_PERCENT"))
{
-
GC.getGameINLINE().setHeroPromotionStatus(getHeroType(),
(PromotionTypes)iI,
GC.getPromotionInfo((PromotionTypes)iI).getHeroPromotionStatus());
+
GC.getGameINLINE().setHeroPromotionStatus(getHeroType(),
(PromotionTypes)iI,
GC.getPromotionInfo((PromotionTypes)iI).getHeroPromotionStatus(), false);
if (isHuman())
{
szBuffer =
gDLL->getText("TXT_KEY_HERO_STEALT_PROMOTION",
GC.getHeroInfo(getLegionHero()).getDescription(),
GC.getPromotionInfo((PromotionTypes)iI).getDescription(),
GC.getHeroInfo(pLoser->getLegionHero()).getDescription());
@@ -17107,7 +17142,7 @@
{
if
(GC.getGameINLINE().getSorenRandNum(100, "Steal Hero Promotion") <
GC.getDefineINT("HERO_STEAL_PROMOTION_PERCENT"))
{
-
GC.getGameINLINE().setHeroPromotionStatus(getHeroType(),
(PromotionTypes)iI,
GC.getPromotionInfo((PromotionTypes)iI).getHeroPromotionStatus());
+
GC.getGameINLINE().setHeroPromotionStatus(getHeroType(),
(PromotionTypes)iI,
GC.getPromotionInfo((PromotionTypes)iI).getHeroPromotionStatus(), false);
CvWString szBuffer =
gDLL->getText("TXT_KEY_HERO_STEALT_PROMOTION",
GC.getHeroInfo(getLegionHero()).getDescription(),
GC.getPromotionInfo((PromotionTypes)iI).getDescription(),
GC.getHeroInfo(pDefender->getLegionHero()).getDescription());
gDLL->getInterfaceIFace()->addMessage(getOwnerINLINE(), true,
GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_UNIT_GREATPEOPLE",
MESSAGE_TYPE_INFO, GC.getHeroInfo(getLegionHero()).getButton(),
(ColorTypes)GC.getInfoTypeForString("COLOR_GREEN"), getX_INLINE(),
getY_INLINE(), true, true);
szBuffer =
gDLL->getText("TXT_KEY_HERO_PROMOTION_STEALT",
GC.getHeroInfo(getLegionHero()).getDescription(),
GC.getPromotionInfo((PromotionTypes)iI).getDescription(),
GC.getHeroInfo(pDefender->getLegionHero()).getDescription());
@@ -17125,7 +17160,7 @@
{
if
(GC.getGameINLINE().getSorenRandNum(100, "Steal Hero Promotion") <
GC.getDefineINT("HERO_STEAL_PROMOTION_PERCENT"))
{
-
GC.getGameINLINE().setHeroPromotionStatus(pDefender->getHeroType(),
(PromotionTypes)iI,
GC.getPromotionInfo((PromotionTypes)iI).getHeroPromotionStatus());
+
GC.getGameINLINE().setHeroPromotionStatus(pDefender->getHeroType(),
(PromotionTypes)iI,
GC.getPromotionInfo((PromotionTypes)iI).getHeroPromotionStatus(), false);
CvWString szBuffer =
gDLL->getText("TXT_KEY_HERO_STEALT_PROMOTION",
GC.getHeroInfo(pDefender->getLegionHero()).getDescription(),
GC.getPromotionInfo((PromotionTypes)iI).getDescription(),
GC.getHeroInfo(getLegionHero()).getDescription());
gDLL->getInterfaceIFace()->addMessage(pDefender->getOwnerINLINE(), true,
GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_UNIT_GREATPEOPLE",
MESSAGE_TYPE_INFO, GC.getHeroInfo(getLegionHero()).getButton(),
(ColorTypes)GC.getInfoTypeForString("COLOR_GREEN"),
pDefender->getX_INLINE(), pDefender->getY_INLINE(), true, true);
szBuffer =
gDLL->getText("TXT_KEY_HERO_PROMOTION_STEALT",
GC.getHeroInfo(pDefender->getLegionHero()).getDescription(),
GC.getPromotionInfo((PromotionTypes)iI).getDescription(),
GC.getHeroInfo(getLegionHero()).getDescription());
@@ -17950,8 +17985,9 @@
bool bLegionProcessed = false;
bool bCurrentLeader =
(GC.getHeroInfo(getHeroType()).getLeaderType() ==
GET_PLAYER(getOwnerINLINE()).getLeaderType());
bool bCurrentCiv =
(GC.getGameINLINE().getCurrentDefaultCivilization(getHeroType()) ==
getCivilizationType());
-
- if (iDieRand < ((pEnemy != NULL && pEnemy->isCoreTroop()) ?
std::max(GC.getDefineINT("HERO_DIE_CHANCE") +
std::min((GC.getHeroInfo(pEnemy->getHeroType()).getMight() -
GC.getHeroInfo(eHero).getMight()), 10), 0) :
GC.getDefineINT("HERO_DIE_CHANCE")))
+ bool bHighDeathChance =
GC.getGameINLINE().isOption(GAMEOPTION_HIGH_HERO_DEATH_CHANCE);
+
+ if (iDieRand < ((pEnemy != NULL && pEnemy->isCoreTroop()) ?
std::max(GC.getDefineINT("HERO_DIE_CHANCE") +
std::min((GC.getHeroInfo(pEnemy->getHeroType()).getMight() -
GC.getHeroInfo(eHero).getMight()), 10), 0) * (bHighDeathChance ? 4 : 1) :
GC.getDefineINT("HERO_DIE_CHANCE") * (bHighDeathChance ? 4 : 1)))
{
if
(!GC.getGameINLINE().isOption(GAMEOPTION_NO_HERO_DEATH_FROM_COMBAT))
{
@@ -19359,7 +19395,36 @@
else
{
FAssert (isCoreTroop());
- CvUnit* pLeaderTroop = processAdvancedLegion(true, false);
+
+ GC.getGameINLINE().swapHeroLegionList(getLeaderHero());
+
+ std::vector< std::pair<HeroTypes, PromotionTypes> >
aNineTransformations;
+
+ for (int iI = 0; iI <
GC.getGameINLINE().getHeroLegionSize(getLeaderHero()); iI++)
+ {
+ CvUnit* pLoopUnit =
GET_PLAYER((PlayerTypes)GC.getGameINLINE().getHeroDebutStatus(getLeaderHero())).getUnit(GC.getGameINLINE().getHeroLegionMemberAt(getLeaderHero(),
iI));
+ if (pLoopUnit != NULL)
+ {
+ HeroTypes eLoopHero = pLoopUnit->getHeroType();
+ PromotionTypes eLoopPromotion =
GC.getGameINLINE().getHeroCurrentNineTransformationPromotion(eLoopHero);
+ if (eLoopPromotion != NO_PROMOTION)
+ {
+ aNineTransformations.push_back( std::make_pair(eLoopHero,
eLoopPromotion) );
+ }
+ }
+ }
+
+ GC.getGameINLINE().swapHeroLegionList(getLeaderHero());
+
+ CvUnit* pLeaderTroop = processAdvancedLegion(true, false, true);
+
+ for (std::vector< std::pair<HeroTypes, PromotionTypes>
>::const_iterator iter = aNineTransformations.begin(); iter !=
aNineTransformations.end(); ++iter)
+ {
+ if
(!GC.getGameINLINE().isHeroNineTransformationPromotion((*iter).first,
(*iter).second))
+ {
+
GC.getGameINLINE().setHeroCurrentNineTransformationPromotion((*iter).first,
NO_PROMOTION);
+ }
+ }
FAssert (pLeaderTroop != NULL);
@@ -19484,17 +19549,46 @@
return true;
}
-CvUnit* CvUnit::dismissAdvancedLegion()
+CvUnit* CvUnit::dismissAdvancedLegion(bool bTemp)
{
FAssert (getHeroType() >= 0 && getHeroType() < GC.getNumHeroInfos());
FAssert (isLeaderTroop());
+ std::vector< std::pair<HeroTypes, PromotionTypes> > aNineTransformations;
+
+ if (!bTemp)
+ {
+ for (int iI = 0; iI <
GC.getGameINLINE().getHeroLegionSize(getLeaderHero()); iI++)
+ {
+ CvUnit* pLoopUnit =
GET_PLAYER((PlayerTypes)GC.getGameINLINE().getHeroDebutStatus(getLeaderHero())).getUnit(GC.getGameINLINE().getHeroLegionMemberAt(getLeaderHero(),
iI));
+ if (pLoopUnit != NULL)
+ {
+ HeroTypes eLoopHero = pLoopUnit->getHeroType();
+ PromotionTypes eLoopPromotion =
GC.getGameINLINE().getHeroCurrentNineTransformationPromotion(eLoopHero);
+ if (eLoopPromotion != NO_PROMOTION)
+ {
+ aNineTransformations.push_back( std::make_pair(eLoopHero,
eLoopPromotion) );
+ }
+ }
+ }
+ }
GC.getGameINLINE().backUpHeroLegionMember(getLeaderHero());
GC.getGameINLINE().clearHeroLegionMember(getLeaderHero());
- CvUnit* pHero = processAdvancedLegion(true, false);
-
- GC.getGameINLINE().setLegionUnitMoved(pHero->getHeroType(), true);
+ CvUnit* pHero = processAdvancedLegion(true, false, true);
+
+ for (std::vector< std::pair<HeroTypes, PromotionTypes> >::const_iterator
iter = aNineTransformations.begin(); iter != aNineTransformations.end();
++iter)
+ {
+ if (!GC.getGameINLINE().isHeroNineTransformationPromotion((*iter).first,
(*iter).second))
+ {
+
GC.getGameINLINE().setHeroCurrentNineTransformationPromotion((*iter).first,
NO_PROMOTION);
+ }
+ }
+
+ if (pHero != NULL)
+ {
+ GC.getGameINLINE().setLegionUnitMoved(pHero->getHeroType(), true);
+ }
gDLL->getInterfaceIFace()->setDirty(PlotListButtons_DIRTY_BIT, true);
@@ -19557,7 +19651,7 @@
return true;
}
-CvUnit* CvUnit::processAdvancedLegion(bool bRegroup, bool bAttacked)
+CvUnit* CvUnit::processAdvancedLegion(bool bRegroup, bool bAttacked, bool
bKeepNineTransformation)
{
PROFILE_FUNC();
@@ -19635,7 +19729,10 @@
eLoopHero = pLoopHero->getHeroType();
eLoopUnitCombat = pLoopHero->getUnitCombatType();
-
GC.getGameINLINE().setHeroCurrentNineTransformationPromotion(eLoopHero,
NO_PROMOTION);
+ if (!bKeepNineTransformation)
+ {
+
GC.getGameINLINE().setHeroCurrentNineTransformationPromotion(eLoopHero,
NO_PROMOTION);
+ }
for (iJ = 0; iJ < GC.getNumPromotionInfos(); iJ++)
{
@@ -20004,14 +20101,22 @@
return true;
}
-bool CvUnit::quitAdvancedLegion()
+bool CvUnit::quitAdvancedLegion(bool bTemp)
{
CvUnit* pLeaderTroop =
GET_PLAYER(getOwnerINLINE()).getUnit(GC.getGameINLINE().getHeroCoreTroop(getLeaderHero()));
FAssert (pLeaderTroop != NULL);
+ PromotionTypes eNineTransformation = bTemp ? NO_PROMOTION :
GC.getGameINLINE().getHeroCurrentNineTransformationPromotion(getHeroType());
+
GC.getGameINLINE().backUpHeroLegionMember(getLeaderHero());
GC.getGameINLINE().deleteHeroLegionMember(getLeaderHero(), getID());
- pLeaderTroop->processAdvancedLegion(true, false);
+ pLeaderTroop->processAdvancedLegion(true, false, true);
+
+ if (eNineTransformation != NO_PROMOTION
&& !GC.getGameINLINE().isHeroNineTransformationPromotion(getHeroType(),
eNineTransformation))
+ {
+
GC.getGameINLINE().setHeroCurrentNineTransformationPromotion(getHeroType(),
NO_PROMOTION);
+ }
+
GC.getGameINLINE().setLegionUnitMoved(getHeroType(), true);
return true;
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvUnit.h Mon Sep 21
20:53:44 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvUnit.h Tue Sep 29
23:51:43 2009
@@ -852,9 +852,9 @@
bool formAdvancedLegion(bool bRegroup, bool bRegroupDone); //
Exposed to Python
bool canFormAdvancedLegion(const CvPlot* pPlot = NULL) const; //
Exposed to Python
bool canDismissAdvancedLegion() const;
- CvUnit* dismissAdvancedLegion();
+ CvUnit* dismissAdvancedLegion(bool bTemp = false);
bool canJoinAdvancedLegion(const CvUnit* pUnit) const; // Exposed
to Python
- CvUnit* processAdvancedLegion(bool bRegroup, bool bAttacked);
+ CvUnit* processAdvancedLegion(bool bRegroup, bool bAttacked, bool
bKeepNineTransformation = false);
bool isLeaderTroop() const; // Exposed to Python
HeroTypes getLeaderHero() const; // Exposed to Python
void setLeaderHero(HeroTypes eHero); // Exposed to Python
@@ -864,7 +864,7 @@
bool joinAdvancedLegion(int iUnitID, bool bAsLeader = false);
bool canRegroupAdvancedLegion(const CvPlot* pPlot) const;
bool canQuitAdvancedLegion() const;
- bool quitAdvancedLegion();
+ bool quitAdvancedLegion(bool bTemp = false);
// Sanguo Mod Hero, end
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CyEnumsInterface.cpp
Sun Sep 27 18:36:06 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CyEnumsInterface.cpp
Tue Sep 29 23:51:43 2009
@@ -537,7 +537,10 @@
.value("GAMEOPTION_NO_ESPIONAGE", GAMEOPTION_NO_ESPIONAGE)
// Sanguo Mod Hero, start, added by poyuzhe 02.08.09
.value("GAMEOPTION_NO_HERO_DEATH_FROM_COMBAT",
GAMEOPTION_NO_HERO_DEATH_FROM_COMBAT)
- //.value("GAMEOPTION_NO_HERO_DEATH_FROM_AGE",
GAMEOPTION_NO_HERO_DEATH_FROM_AGE)
+ .value("GAMEOPTION_NO_HERO_DEATH_FROM_AGE",
GAMEOPTION_NO_HERO_DEATH_FROM_AGE)
+ .value("GAMEOPTION_NO_HERO_EXECUTION", GAMEOPTION_NO_HERO_EXECUTION)
+ .value("GAMEOPTION_ENABLE_ARMY", GAMEOPTION_ENABLE_ARMY)
+ .value("GAMEOPTION_HIGH_HERO_DEATH_CHANCE",
GAMEOPTION_HIGH_HERO_DEATH_CHANCE)
.value("GAMEOPTION_NO_SETTLER", GAMEOPTION_NO_SETTLER)
// Sanguo Mod Hero, end
.value("NUM_GAMEOPTION_TYPES", NUM_GAMEOPTION_TYPES)
@@ -2016,5 +2019,10 @@
python::enum_<SurrenderTypes>("SurrenderTypes")
.value("NO_SURRENDER", NO_SURRENDER)
;
+
+ // Random Leader
+ python::enum_<RandomLeaderTypes>("RandomLeaderTypes")
+ .value("NO_RANDOMLEADER", NO_RANDOMLEADER)
+ ;
// Sanguo Mod XML, end
}
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CyGame.cpp Sun Sep
27 18:36:06 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CyGame.cpp Tue Sep
29 23:51:43 2009
@@ -1226,7 +1226,7 @@
{
if (m_pGame)
{
- m_pGame->setHeroPromotionStatus((HeroTypes)eHero,
(PromotionTypes)ePromotion, iNewValue);
+ m_pGame->setHeroPromotionStatus((HeroTypes)eHero,
(PromotionTypes)ePromotion, iNewValue, false);
}
}
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CyGlobalContext.cpp
Fri Sep 11 07:14:16 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CyGlobalContext.cpp
Tue Sep 29 23:51:43 2009
@@ -139,7 +139,10 @@
CvLeaderHeadInfo* CyGlobalContext::getLeaderHeadInfo(int i) const
{
- return (i>=0 && i<GC.getNumLeaderHeadInfos()) ?
&GC.getLeaderHeadInfo((LeaderHeadTypes) i) : NULL;
+ // Sanguo Mod random leader, start, by poyuzhe 09.30.09
+ //return (i>=0 && i<GC.getNumLeaderHeadInfos()) ?
&GC.getLeaderHeadInfo((LeaderHeadTypes) i) : NULL;
+ return (i>=0 && i< (GC.getNumLeaderHeadInfos() +
GC.getNumRandomLeaderInfos()) ) ? &GC.getLeaderHeadInfo((LeaderHeadTypes)
i) : NULL;
+ // Sanguo Mod random leader, end
}
@@ -667,4 +670,10 @@
{
return (i>=0 && i<GC.getNumSurrenderInfos()) ?
&GC.getSurrenderInfo((SurrenderTypes) i) : NULL;
}
+
+// Random Leader
+CvLeaderHeadInfo* CyGlobalContext::getRandomLeaderInfo(int i) const
+{
+ return (i>=0 && i<GC.getNumRandomLeaderInfos()) ?
&GC.getRandomLeaderInfo((RandomLeaderTypes) i) : NULL;
+}
// Sanguo Mod XML, end
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CyGlobalContext.h
Fri Sep 11 07:14:16 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CyGlobalContext.h
Tue Sep 29 23:51:43 2009
@@ -105,6 +105,9 @@
// Surrender Personality, added by poyuzhe 9.10.09
CvSurrenderInfo* getSurrenderInfo(int i) const;
+
+ // random leader
+ CvLeaderHeadInfo* getRandomLeaderInfo(int i) const;
// Sanguo Mod XML, end
int getInfoTypeForString(const char* szInfoType) const;
@@ -249,6 +252,9 @@
// Surrender Personality, added by poyuzhe 9.10.09
int getNumSurrenderInfos() const { return GC.getNumSurrenderInfos(); }
+
+ // Random Leader
+ int getNumRandomLeaderInfos() const { return
GC.getNumRandomLeaderInfos(); }
// Sanguo Mod XML, end
// ArtInfos
=======================================
--- /trunk/The History of Three
Kingdoms/CvGameCoreDLL/CyGlobalContextInterface4.cpp Fri Sep 11 07:14:16
2009
+++ /trunk/The History of Three
Kingdoms/CvGameCoreDLL/CyGlobalContextInterface4.cpp Tue Sep 29 23:51:43
2009
@@ -190,6 +190,10 @@
// Surrender Personality, added by poyuzhe 9.10.09
.def("getNumSurrenderInfos", &CyGlobalContext::getNumSurrenderInfos, "()
- Total Surrender Infos XML\\Sanguo\\CIV4SurrenderInfos.xml")
.def("getSurrenderInfo", &CyGlobalContext::getSurrenderInfo,
python::return_value_policy<python::reference_existing_object>(), "(SurrenderID)
- CvInfo for SurrenderID")
+
+ // Random Leader
+ .def("getNumRandomLeaderInfos",
&CyGlobalContext::getNumRandomLeaderInfos, "() - Total Random Leader Infos
XML\\Sanguo\\CIV4SurrenderInfos.xml")
+ .def("getRandomLeaderInfo", &CyGlobalContext::getRandomLeaderInfo,
python::return_value_policy<python::reference_existing_object>(), "(RandomLeaderID)
- CvInfo for RandomLeaderID")
// Sanguo Mod XML, end
;
=======================================
--- /trunk/The History of Three Kingdoms/Documents/changelog.txt Sun Sep 27
18:36:06 2009
+++ /trunk/The History of Three Kingdoms/Documents/changelog.txt Tue Sep 29
23:51:43 2009
@@ -1076,3 +1076,11 @@
0.302: ÐÞÕý£ºÐÞÕý¡°È°½µ¡±°´Å¥²»Òþ²ØµÄBug
ÐÞÕý¡°widget already registered¡±ÐÅÏ¢
ÐÂÔöÄÚÈÝ£ºÔö¼Ó²¿·Öµ¯³öʽ°ïÖúÎÄ×Ö
+
+0.303: ÐÞÕý£ºÐÞÕý¼¯ÍžüϵͳµÈµÄBug
+ ÐÞÕý¶ªÊ§µÄÍâ½»ÎÄ×Ö
+ ½çÃæ£º½«Ó¢ÐÛÐÕÃû·ÅÖÃÔÚ²¿·ÖÆÁÄ»
+ ÐÞÕýËæ»úÓ¢ÐÛÆÁÄ»ÏÔʾÎÊÌâ
+ ÏÔʾµ¤Ñô±ø½ø¹¥Ë®¾üµÄʤÂÊ
+ µØÍ¼£ºµ÷ÕûÁ˵ØÍ¼²¿·ÖÊÆÁ¦·Çʷʵ³õʼ±øÁ¦µÄ²ÎÊý
+ ¹æÔòµ÷Õû£ºÌí¼ÓÁ˼¸¸öÓÎÏ·Ñ¡Ïî
=======================================
--- /trunk/The History of Three Kingdoms/Documents/changelog_en.txt Sun Sep
27 18:36:06 2009
+++ /trunk/The History of Three Kingdoms/Documents/changelog_en.txt Tue Sep
29 23:51:43 2009
@@ -1,3 +1,12 @@
+0.303: fix: fix various small bugs
+ fix a few bugs in Army system
+ fix missing diplomacy text
+ map: revised dynamic initial unit rule for major civs
+ interface: place hero names on some screen
+ fix random hero screen display problem
+ display combat odds when Danyang Armies attack naval units
+ rule tweak: added a few game options
+
0.302: fix: fix a bug that the persuade button will not disappear
fix widget already registered message
new content: add several advisor help popups when player has accomplished
certain actions
=======================================
--- /trunk/The History of Three Kingdoms/PublicMaps/HoTK 51_51
196AD.CivBeyondSwordWBSave Fri Sep 25 08:21:08 2009
+++ /trunk/The History of Three Kingdoms/PublicMaps/HoTK 51_51
196AD.CivBeyondSwordWBSave Tue Sep 29 23:51:43 2009
@@ -645,6 +645,8 @@
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=10
+ SpecialInitUnitTargetAI=19
EndPlayer
BeginPlayer
Team=1
@@ -676,6 +678,7 @@
SpecialInitUnitTargetAI=0
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=7
EndPlayer
BeginPlayer
Team=2
@@ -743,6 +746,7 @@
SpecialInitUnitTargetAI=0
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
+ SpecialInitUnitTargetAI=9
EndPlayer
BeginPlayer
Team=4
@@ -809,6 +813,7 @@
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=8
EndPlayer
BeginPlayer
Team=6
@@ -906,6 +911,7 @@
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=5
EndPlayer
BeginPlayer
Team=9
=======================================
--- /trunk/The History of Three Kingdoms/PublicMaps/HoTK 68_64
194AD.CivBeyondSwordWBSave Fri Sep 25 08:21:08 2009
+++ /trunk/The History of Three Kingdoms/PublicMaps/HoTK 68_64
194AD.CivBeyondSwordWBSave Tue Sep 29 23:51:43 2009
@@ -627,6 +627,8 @@
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=10
+ SpecialInitUnitTargetAI=19
EndPlayer
BeginPlayer
Team=1
@@ -659,6 +661,7 @@
SpecialInitUnitTargetAI=0
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=7
EndPlayer
BeginPlayer
Team=2
@@ -728,6 +731,7 @@
SpecialInitUnitTargetAI=0
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
+ SpecialInitUnitTargetAI=9
EndPlayer
BeginPlayer
Team=4
@@ -795,6 +799,7 @@
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=8
EndPlayer
BeginPlayer
Team=6
@@ -894,6 +899,7 @@
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=5
EndPlayer
BeginPlayer
Team=9
=======================================
--- /trunk/The History of Three Kingdoms/PublicMaps/HoTK 68_64
196AD.CivBeyondSwordWBSave Fri Sep 25 08:21:08 2009
+++ /trunk/The History of Three Kingdoms/PublicMaps/HoTK 68_64
196AD.CivBeyondSwordWBSave Tue Sep 29 23:51:43 2009
@@ -628,6 +628,8 @@
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=10
+ SpecialInitUnitTargetAI=19
EndPlayer
BeginPlayer
Team=1
@@ -660,6 +662,7 @@
SpecialInitUnitTargetAI=0
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=7
EndPlayer
BeginPlayer
Team=2
@@ -761,6 +764,7 @@
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=9
EndPlayer
BeginPlayer
Team=5
@@ -794,6 +798,7 @@
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=8
EndPlayer
BeginPlayer
Team=6
@@ -893,6 +898,7 @@
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=5
EndPlayer
BeginPlayer
Team=9
=======================================
--- /trunk/The History of Three Kingdoms/PublicMaps/HoTK 81_81
196AD.CivBeyondSwordWBSave Thu Sep 24 10:17:15 2009
+++ /trunk/The History of Three Kingdoms/PublicMaps/HoTK 81_81
196AD.CivBeyondSwordWBSave Tue Sep 29 23:51:43 2009
@@ -656,6 +656,8 @@
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=10
+ SpecialInitUnitTargetAI=19
EndPlayer
BeginPlayer
Team=1
@@ -688,6 +690,7 @@
SpecialInitUnitTargetAI=0
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=7
EndPlayer
BeginPlayer
Team=2
@@ -756,6 +759,7 @@
SpecialInitUnitTargetAI=0
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
+ SpecialInitUnitTargetAI=9
EndPlayer
BeginPlayer
Team=4
@@ -822,6 +826,7 @@
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=8
EndPlayer
BeginPlayer
Team=6
@@ -921,6 +926,7 @@
SpecialInitUnitTargetAI=1
SpecialInitUnitTargetAI=2
SpecialInitUnitTargetAI=3
+ SpecialInitUnitTargetAI=5
EndPlayer
BeginPlayer
Team=9