Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial build for great admiral leader(commodore) #1587

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
8 changes: 8 additions & 0 deletions Assets/Python/Screens/CvMainInterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -4255,6 +4255,14 @@ def updateInfoPaneStrings(self, screen):
screen.appendTableRow(unitTable)
screen.setTableText(unitTable, 1, iRow, "<font=1>" + szTxt2, "", eWidGen, 0, 0, 1<<0)
iRow += 1
if CyUnit.isCommodore():
szTxt2 = u"%d/%d " %(CyUnit.getCommodoreControlPointsLeft(), CyUnit.getCommodoreControlPoints())
screen.appendTableRow(unitTable)
screen.setTableText(unitTable, 0, iRow, "<font=1>Control:", "", eWidGen, 0, 0, 1<<0)
iRow += 1
screen.appendTableRow(unitTable)
screen.setTableText(unitTable, 1, iRow, "<font=1>" + szTxt2, "", eWidGen, 0, 0, 1<<0)
iRow += 1
if CySelectionGroup:
if iMissionCount > 1:
for i in xrange(iMissionCount):
Expand Down
10 changes: 10 additions & 0 deletions Assets/Python/pyWB/CvWBDesc.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,8 @@ def write(self, f, unit, plot):
)
if unit.isCommander():
f.write("\t\tCommander=1\n")
if unit.isCommodore():
f.write("\t\tCommodore=1\n")
if unit.getNameNoDesc():
f.write("\t\tUnitName=%s\n" % unit.getNameNoDesc().encode(fEncode))
if unit.getLeaderUnitType() != -1:
Expand Down Expand Up @@ -886,6 +888,7 @@ def read(self, f, pX, pY):
self.isPatrol = False
self.isPlunder = False
self.bCommander = False
self.bCommodore = False
self.szUnitAIType = "NO_UNITAI"
self.iImmobile = 0
self.iBaseCombatStr = -1
Expand Down Expand Up @@ -918,6 +921,11 @@ def read(self, f, pX, pY):
self.bCommander = True
continue

v = parser.findTokenValue(toks, "Commodore")
if v != -1:
self.bCommodore = True
continue

v = parser.findTokenValue(toks, "LeaderUnitType")
if v != -1:
self.leaderUnitType = v
Expand Down Expand Up @@ -1009,6 +1017,8 @@ def apply(self):

if self.bCommander:
unit.setCommander(True)
if self.bCommodore:
unit.setCommodore(True)
if self.leaderUnitType != None:
leaderUnitTypeNum = GC.getInfoTypeForString(self.leaderUnitType)
if leaderUnitTypeNum > -1:
Expand Down
7 changes: 7 additions & 0 deletions Assets/XML/GameInfo/CIV4GameOptionInfos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,13 @@
<bDefault>0</bDefault>
<bVisible>1</bVisible>
</GameOptionInfo>
<GameOptionInfo>
<Type>GAMEOPTION_UNIT_GREAT_COMMODORES</Type>
<Description>TXT_KEY_GAMEOPTION_UNIT_GREAT_COMMODORES</Description>
<Help>TXT_KEY_GAMEOPTION_UNIT_GREAT_COMMODORES_HELP</Help>
<bDefault>0</bDefault>
<bVisible>1</bVisible>
</GameOptionInfo>
<GameOptionInfo>
<Type>GAMEOPTION_UNIT_XP_FROM_SPECIALISTS</Type>
<Description>TXT_KEY_GAMEOPTION_UNIT_XP_FROM_SPECIALISTS</Description>
Expand Down
4 changes: 4 additions & 0 deletions Assets/XML/GameText/Combat_CIV4GameText.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4551,6 +4551,10 @@
<Polish>Robotnicy Wojenni</Polish>
<Russian>Âîåííûå ðàáî÷èå</Russian>
</TEXT>
<TEXT>
<Tag>TXT_KEY_UNITCOMBAT_COMMODORE</Tag>
<English>Commodore</English>
</TEXT>
<TEXT>
<Tag>TXT_KEY_UNITCOMBAT_COMMANDER</Tag>
<English>Commanders</English>
Expand Down
8 changes: 8 additions & 0 deletions Assets/XML/GameText/Gameoptions_CIV4GameText.xml
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,10 @@
<Polish>Wielcy Dow&#243;dcy</Polish>
<Russian>Великие полководцы</Russian>
</TEXT>
<TEXT>
<Tag>TXT_KEY_GAMEOPTION_UNIT_GREAT_COMMODORES</Tag>
<English>Unit - Great Commodores</English>
</TEXT>
<TEXT>
<Tag>TXT_KEY_GAMEOPTION_UNIT_GREAT_COMMANDERS_HELP</Tag>
<English>Great Commanders give Great Generals many bonuses for leading troops into battle, instead of just attaching to a squad of existing troops.</English>
Expand All @@ -503,6 +507,10 @@
<Polish>Wielcy Dow&#243;dcy daj&#185; Wielkim Genera&#179;om wiele premii dla oddzia&#179;&#243;w prowadzonych do walki, a nie tylko jednemu oddzia&#179;owi.</Polish>
<Russian>Дать великим генералам кучу бонусов за руководство войсками в бою, вместо простого присоединения к действующим отрядам.</Russian>
</TEXT>
<TEXT>
<Tag>TXT_KEY_GAMEOPTION_UNIT_GREAT_COMMODORES_HELP</Tag>
<English>Great Commodores lead their fleets into open combat on the open seas.</English>
</TEXT>
<TEXT>
<Tag>TXT_KEY_GAMEOPTION_COMBAT_HEART_OF_WAR</Tag>
<English>Combat - Heart of War</English>
Expand Down
8 changes: 8 additions & 0 deletions Assets/XML/GameText/Mission_CIV4GameText.xml
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,14 @@
<Polish>Dow&#243;dca Polowy</Polish>
<Russian>Полевой командир</Russian>
</TEXT>
<TEXT>
<Tag>TXT_KEY_MISSION_GREAT_COMMODORE</Tag>
<English>Sea commodore</English>
</TEXT>
<TEXT>
<Tag>TXT_KEY_MISSION_GREAT_COMMODORE_HELP</Tag>
<English>Sea commodore, will lose its ability to join cities make wonders, but will get the ability to earn experience promotions and lead naval units into battle.</English>
</TEXT>
<TEXT>
<Tag>TXT_KEY_MISSION_GREAT_COMMANDER_HELP</Tag>
<English>Turns the Great General into a Field Commander: it loses its abilities to join cities, units, or construct wonders, but acquires the ability to earn experience, gain promotions, and lead units in the field.</English>
Expand Down
8 changes: 8 additions & 0 deletions Assets/XML/GameText/Promotions_CIV4GameText.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3182,6 +3182,10 @@
<Polish>Linia Promocji: Morale</Polish>
<Russian>Áîåâàÿ ìîðàëü</Russian>
</TEXT>
<TEXT>
<Tag>TXT_KEY_PROMOTIONLINE_MORALE_SHIPS</Tag>
<English>Ship Morale Promotion Line</English>
</TEXT>
<TEXT>
<Tag>TXT_KEY_PROMOTIONLINE_NAVIGATION</Tag>
<English>Navigation Promotion Line</English>
Expand Down Expand Up @@ -11191,6 +11195,10 @@
<Italian>Morale</Italian>
<Spanish>Moral</Spanish>
</TEXT>
<TEXT>
<Tag>TXT_KEY_PROMOTION_SHIP_MORALE1</Tag>
<English>Ship Morale I</English>
</TEXT>
<TEXT>
<Tag>TXT_KEY_PROMOTION_MORALE1</Tag>
<English>Morale I</English>
Expand Down
23 changes: 23 additions & 0 deletions Assets/XML/Units/CIV4MissionInfos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,29 @@
<bVisible>1</bVisible>
<Button>Art/Interface/Buttons/promotions/field_commander.dds</Button>
</MissionInfo>
<MissionInfo>
<Type>MISSION_GREAT_COMMODORE</Type>
<Description>TXT_KEY_MISSION_GREAT_COMMODORE</Description>
<Help>TXT_KEY_MISSION_GREAT_COMMODORE_HELP</Help>
<Waypoint>NONE</Waypoint>
<EntityEventType>ENTITY_EVENT_GREAT_EVENT</EntityEventType>
<iTime>16</iTime>
<bTarget>0</bTarget>
<bBuild>0</bBuild>
<bSound>1</bSound>
<HotKey/>
<bAltDown>0</bAltDown>
<bShiftDown>0</bShiftDown>
<bCtrlDown>0</bCtrlDown>
<iHotKeyPriority>0</iHotKeyPriority>
<HotKeyAlt/>
<bAltDownAlt>0</bAltDownAlt>
<bShiftDownAlt>0</bShiftDownAlt>
<bCtrlDownAlt>0</bCtrlDownAlt>
<iHotKeyPriorityAlt>0</iHotKeyPriorityAlt>
<bVisible>1</bVisible>
<Button>Art/Interface/Buttons/promotions/field_commander.dds</Button>
</MissionInfo>
<MissionInfo>
<Type>MISSION_SHADOW</Type>
<Description>TXT_KEY_ACTION_AUTOMATE_PROTECT</Description>
Expand Down
10 changes: 10 additions & 0 deletions Assets/XML/Units/CIV4PromotionInfos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7315,6 +7315,16 @@
<Button>Art/Interface/Buttons/promotions/operations4.dds</Button>
<iControlPoints>10</iControlPoints>
</PromotionInfo>
<PromotionInfo>
<Type>PROMOTION_SHIP_MORALE1</Type>
<Description>TXT_KEY_PROMOTION_SHIP_MORALE1</Description>
<Sound>AS2D_IF_LEVELUP</Sound>
<PromotionLine>PROMOTIONLINE_MORALE_SHIPS</PromotionLine>
<iLinePriority>1</iLinePriority>
<iCombatPercent>10</iCombatPercent>
<Button>Art/Interface/Buttons/promotions/shipMorale1.dds</Button>
<iCaptureResistanceModifierChange>5</iCaptureResistanceModifierChange>
</PromotionInfo>
<PromotionInfo>
<Type>PROMOTION_MORALE1</Type>
<Description>TXT_KEY_PROMOTION_MORALE1</Description>
Expand Down
19 changes: 19 additions & 0 deletions Assets/XML/Units/CIV4PromotionLineInfos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -945,12 +945,21 @@
<UnitCombatPrereqType>UNITCOMBAT_ROBOT</UnitCombatPrereqType>
</UnitCombatPrereqTypes>
</PromotionLineInfo>
<PromotionLineInfo>
<Type>PROMOTIONLINE_MORALE_SHIPS</Type>
<Description>TXT_KEY_PROMOTIONLINE_MORALE_SHIPS</Description>
<Button>Art/Interface/Buttons/promotions/shipMorale1.dds</Button>
<UnitCombatPrereqTypes>
<UnitCombatPrereqType>UNITCOMBAT_COMMODORE</UnitCombatPrereqType>
</UnitCombatPrereqTypes>
</PromotionLineInfo>
<PromotionLineInfo>
<Type>PROMOTIONLINE_OPERATIONS</Type>
<Description>TXT_KEY_PROMOTIONLINE_OPERATIONS</Description>
<Button>Art/Interface/Buttons/promotions/operations1.dds</Button>
<UnitCombatPrereqTypes>
<UnitCombatPrereqType>UNITCOMBAT_COMMANDER</UnitCombatPrereqType>
<UnitCombatPrereqType>UNITCOMBAT_COMMODORE</UnitCombatPrereqType>
</UnitCombatPrereqTypes>
</PromotionLineInfo>
<PromotionLineInfo>
Expand All @@ -959,6 +968,7 @@
<Button>Art/Interface/Buttons/promotions/morale1.dds</Button>
<UnitCombatPrereqTypes>
<UnitCombatPrereqType>UNITCOMBAT_COMMANDER</UnitCombatPrereqType>
<UnitCombatPrereqType>UNITCOMBAT_COMMODORE</UnitCombatPrereqType>
</UnitCombatPrereqTypes>
</PromotionLineInfo>
<PromotionLineInfo>
Expand All @@ -967,6 +977,7 @@
<Button>Art/Interface/Buttons/promotions/tactics1.dds</Button>
<UnitCombatPrereqTypes>
<UnitCombatPrereqType>UNITCOMBAT_COMMANDER</UnitCombatPrereqType>
<UnitCombatPrereqType>UNITCOMBAT_COMMODORE</UnitCombatPrereqType>
</UnitCombatPrereqTypes>
</PromotionLineInfo>
<PromotionLineInfo>
Expand All @@ -975,6 +986,7 @@
<Button>Art/Interface/Buttons/promotions/initiative1.dds</Button>
<UnitCombatPrereqTypes>
<UnitCombatPrereqType>UNITCOMBAT_COMMANDER</UnitCombatPrereqType>
<UnitCombatPrereqType>UNITCOMBAT_COMMODORE</UnitCombatPrereqType>
</UnitCombatPrereqTypes>
</PromotionLineInfo>
<PromotionLineInfo>
Expand All @@ -983,6 +995,7 @@
<Button>Art/Interface/Buttons/promotions/SelfPreservation1.dds</Button>
<UnitCombatPrereqTypes>
<UnitCombatPrereqType>UNITCOMBAT_COMMANDER</UnitCombatPrereqType>
<UnitCombatPrereqType>UNITCOMBAT_COMMODORE</UnitCombatPrereqType>
</UnitCombatPrereqTypes>
</PromotionLineInfo>
<PromotionLineInfo>
Expand All @@ -991,6 +1004,7 @@
<Button>art/Buttons/Promotions/CommanderCommand1.dds</Button>
<UnitCombatPrereqTypes>
<UnitCombatPrereqType>UNITCOMBAT_COMMANDER</UnitCombatPrereqType>
<UnitCombatPrereqType>UNITCOMBAT_COMMODORE</UnitCombatPrereqType>
</UnitCombatPrereqTypes>
</PromotionLineInfo>
<PromotionLineInfo>
Expand All @@ -999,6 +1013,7 @@
<Button>art/Buttons/Promotions/CommanderGeneralStaff1.dds</Button>
<UnitCombatPrereqTypes>
<UnitCombatPrereqType>UNITCOMBAT_COMMANDER</UnitCombatPrereqType>
<UnitCombatPrereqType>UNITCOMBAT_COMMODORE</UnitCombatPrereqType>
</UnitCombatPrereqTypes>
</PromotionLineInfo>
<PromotionLineInfo>
Expand Down Expand Up @@ -2427,6 +2442,7 @@
<Button>Art/Interface/Buttons/Promotions/flaming1.dds</Button>
<UnitCombatPrereqTypes>
<UnitCombatPrereqType>UNITCOMBAT_COMMANDER</UnitCombatPrereqType>
<UnitCombatPrereqType>UNITCOMBAT_COMMODORE</UnitCombatPrereqType>
</UnitCombatPrereqTypes>
</PromotionLineInfo>
<PromotionLineInfo>
Expand All @@ -2445,6 +2461,7 @@
<Button>Art/Interface/Buttons/Promotions/flaming1.dds</Button>
<UnitCombatPrereqTypes>
<UnitCombatPrereqType>UNITCOMBAT_COMMANDER</UnitCombatPrereqType>
<UnitCombatPrereqType>UNITCOMBAT_COMMODORE</UnitCombatPrereqType>
</UnitCombatPrereqTypes>
</PromotionLineInfo>
<PromotionLineInfo>
Expand All @@ -2462,6 +2479,7 @@
<Button>Art/Interface/Buttons/Promotions/flaming1.dds</Button>
<UnitCombatPrereqTypes>
<UnitCombatPrereqType>UNITCOMBAT_COMMANDER</UnitCombatPrereqType>
<UnitCombatPrereqType>UNITCOMBAT_COMMODORE</UnitCombatPrereqType>
</UnitCombatPrereqTypes>
</PromotionLineInfo>
<PromotionLineInfo>
Expand Down Expand Up @@ -2926,6 +2944,7 @@
<UnitCombatPrereqType>UNITCOMBAT_LAW_ENFORCEMENT</UnitCombatPrereqType>
<UnitCombatPrereqType>UNITCOMBAT_SPY</UnitCombatPrereqType>
<UnitCombatPrereqType>UNITCOMBAT_COMMANDER</UnitCombatPrereqType>
<UnitCombatPrereqType>UNITCOMBAT_COMMODORE</UnitCombatPrereqType>
<UnitCombatPrereqType>UNITCOMBAT_ADMINISTRATOR</UnitCombatPrereqType>
</UnitCombatPrereqTypes>
<NotOnUnitCombatTypes>
Expand Down
9 changes: 9 additions & 0 deletions Assets/XML/Units/CIV4UnitCombatInfos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,15 @@
<bCannotMergeSplit>1</bCannotMergeSplit>
<Button>Art/Interface/Buttons/units/sparth/categories/commanders.dds</Button>
</UnitCombatInfo>
<UnitCombatInfo>
<Type>UNITCOMBAT_COMMODORE</Type>
<Description>TXT_KEY_UNITCOMBAT_COMMODORE</Description>
<Categories>
<Category>CATEGORY_UNITCOMBAT_GROUP_PRIMARY_ROLE</Category>
</Categories>
<bCannotMergeSplit>1</bCannotMergeSplit>
<Button>Art/Interface/Buttons/units/sparth/categories/commanders.dds</Button>
</UnitCombatInfo>
<UnitCombatInfo>
<Type>UNITCOMBAT_TRADE</Type>
<Description>TXT_KEY_UNITCOMBAT_TRADE</Description>
Expand Down
8 changes: 7 additions & 1 deletion Assets/XML/Units/U_Land_CIV4UnitInfos.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38542,7 +38542,7 @@
<Combat>UNITCOMBAT_PRODIGY</Combat>
<SubCombatTypes>
<SubCombatType>UNITCOMBAT_CAPTAIN</SubCombatType>
<SubCombatType>UNITCOMBAT_COMMANDER</SubCombatType>
<SubCombatType>UNITCOMBAT_COMMODORE</SubCombatType>
<SubCombatType>UNITCOMBAT_ATTACHE</SubCombatType>
<SubCombatType>UNITCOMBAT_SPECIES_HUMAN</SubCombatType>
<SubCombatType>UNITCOMBAT_MOTILITY_FOOT</SubCombatType>
Expand Down Expand Up @@ -38575,6 +38575,12 @@
<bGreatPeople>1</bGreatPeople>
</GreatPeople>
</GreatPeoples>
<UnitUpgrades>
<UnitType>UNIT_MASTER_SAILOR_WAR_CANOE</UnitType>
<UnitType>UNIT_MASTER_SAILOR_KAYAK</UnitType>
<UnitType>UNIT_MASTER_SAILOR_UBOAT</UnitType>
<UnitType>UNIT_MASTER_SAILOR_EARLY_CARRIER</UnitType>
</UnitUpgrades>
<Buildings>
<BuildingType>BUILDING_TRADITION_SEA_HUNTING</BuildingType>
<BuildingType>BUILDING_TRADITION_NAVAL_MASCOT</BuildingType>
Expand Down
Loading
Loading