Ticket #3930: 3930.4.diff
File 3930.4.diff, 8.2 KB (added by , 8 years ago) |
---|
-
binaries/data/mods/public/gui/session/selection_panels.js
g_SelectionPanels.Research = { 800 800 data.entType = data.item.pair ? [data.item.top, data.item.bottom] : [data.item]; 801 801 data.template = data.entType.map(GetTechnologyData); 802 802 // abort if no template found for any of the techs 803 803 if (data.template.some(v => !v)) 804 804 return false; 805 data.template = data.template.map(t => Engine.GuiInterfaceCall("GetModifiedTechnologyCosts", { 806 "template": t, 807 "ent": data.unitEntState.id 808 })); 805 809 // index one row below 806 810 var shiftedIndex = data.i + data.rowLength; 807 811 data.positions = data.item.pair ? [data.i, shiftedIndex] : [shiftedIndex]; 808 812 data.positionsToHide = data.item.pair ? [] : [data.i]; 809 813 -
binaries/data/mods/public/simulation/components/GuiInterface.js
GuiInterface.prototype.GetTechnologyData 621 621 622 622 let cmpPlayer = QueryPlayerIDInterface(player, IID_Player); 623 623 return GetTechnologyDataHelper(template, cmpPlayer.GetCiv()); 624 624 }; 625 625 626 GuiInterface.prototype.GetModifiedTechnologyCosts = function(player, data) 627 { 628 for (let c in data.template.cost) 629 data.template.cost[c] = ApplyValueModificationsToEntity("Technology/Cost/"+c, +data.template.cost[c], data.ent); 630 return data.template; 631 }; 632 626 633 GuiInterface.prototype.IsTechnologyResearched = function(player, data) 627 634 { 628 635 if (!data.tech) 629 636 return true; 630 637 … … let exposedFunctions = { 1929 1936 "GetEntityState": 1, 1930 1937 "GetExtendedEntityState": 1, 1931 1938 "GetAverageRangeForBuildings": 1, 1932 1939 "GetTemplateData": 1, 1933 1940 "GetTechnologyData": 1, 1941 "GetModifiedTechnologyCosts": 1, 1934 1942 "IsTechnologyResearched": 1, 1935 1943 "CheckTechnologyRequirements": 1, 1936 1944 "GetStartedResearch": 1, 1937 1945 "GetBattleState": 1, 1938 1946 "GetIncomingAttacks": 1, -
binaries/data/mods/public/simulation/components/ProductionQueue.js
ProductionQueue.prototype.AddBatch = fun 319 319 var cmpDataTemplateManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_DataTemplateManager); 320 320 var template = cmpDataTemplateManager.GetTechnologyTemplate(templateName); 321 321 if (!template) 322 322 return; 323 323 var cmpPlayer = QueryOwnerInterface(this.entity); 324 var time = template.researchTime* cmpPlayer.GetCheatTimeMultiplier();324 var time = ApplyValueModificationsToEntity("Technology/Cost/time", +template.researchTime, this.entity) * cmpPlayer.GetCheatTimeMultiplier(); 325 325 326 326 var cost = {}; 327 for each (var r in ["food", "wood", "stone", "metal"])328 cost[r ] = Math.floor(template.cost[r]);327 for (let res in template.cost) 328 cost[res] = Math.floor(ApplyValueModificationsToEntity("Technology/Cost/"+res, +template.cost[res], this.entity)); 329 329 330 330 // TrySubtractResources should report error to player (they ran out of resources) 331 331 if (!cmpPlayer.TrySubtractResources(cost)) 332 332 return; 333 333 -
binaries/data/mods/public/simulation/data/auras/maur_hero_ashoka.json
1 { 2 "type": "global", 3 "affectedPlayers": ["MutualAlly"], 4 "affects": ["Temple"], 5 "modifications": [ 6 { "value": "Technology/Cost/wood", "multiply": 0.5 }, 7 { "value": "Technology/Cost/food", "multiply": 0.5 }, 8 { "value": "Technology/Cost/metal", "multiply": 0.5 }, 9 { "value": "Technology/Cost/stone", "multiply": 0.5 }, 10 { "value": "Technology/Cost/time", "multiply": 0.5 } 11 ], 12 "auraDescription": "All allied Temple technologies -50% cost and -50% research time.", 13 "auraName": "Evangelism Aura", 14 "overlayIcon": "art/textures/ui/session/auras/build_bonus.png" 15 } -
binaries/data/mods/public/simulation/data/auras/maur_hero_chanakya.json
1 { 2 "type": "garrison", 3 "affects": ["Structure"], 4 "modifications": [ 5 { "value": "Technology/Cost/time", "multiply": 0.5 } 6 ], 7 "auraDescription": "Empower a building with -50% research time.", 8 "auraName": "Teacher Aura", 9 "overlayIcon": "art/textures/ui/session/auras/build_bonus.png" 10 } -
binaries/data/mods/public/simulation/templates/template_structure_military_blacksmith.xml
15 15 </Footprint> 16 16 <GarrisonHolder> 17 17 <Max>1</Max> 18 18 <EjectHealth>0.1</EjectHealth> 19 19 <EjectClassesOnDestroy datatype="tokens">Unit</EjectClassesOnDestroy> 20 <List datatype="tokens">Infantry </List>20 <List datatype="tokens">Infantry Healer</List> 21 21 <BuffHeal>0</BuffHeal> 22 22 <LoadingRange>2</LoadingRange> 23 23 </GarrisonHolder> 24 24 <Health> 25 25 <Max>2000</Max> -
binaries/data/mods/public/simulation/templates/units/maur_hero_ashoka.xml
1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <Entity parent="template_unit_hero_cavalry_archer"> 3 <Auras datatype="tokens">maur_hero_ashoka</Auras> 3 4 <Footprint replace=""> 4 5 <Square width="6.0" depth="12.0"/> 5 6 <Height>5.0</Height> 6 7 </Footprint> 7 8 <Identity> -
binaries/data/mods/public/simulation/templates/units/maur_hero_chanakya.xml
3 3 <Armour> 4 4 <Hack>4.0</Hack> 5 5 <Pierce>8.0</Pierce> 6 6 <Crush>4.0</Crush> 7 7 </Armour> 8 <Heal> 9 <Range>20</Range> 10 <HP>12</HP> 11 <Rate>2000</Rate> 12 <UnhealableClasses datatype="tokens"/> 13 <HealableClasses datatype="tokens">Human</HealableClasses> 14 </Heal> 8 <Auras datatype="tokens">maur_hero_chanakya</Auras> 15 9 <Cost> 16 10 <Population>2</Population> 17 11 <BuildTime>60</BuildTime> 18 12 <Resources> 19 13 <food>100</food> 20 14 <metal>250</metal> 21 15 </Resources> 22 16 </Cost> 17 <Heal> 18 <Range>20</Range> 19 <HP>12</HP> 20 <Rate>2000</Rate> 21 <UnhealableClasses datatype="tokens"/> 22 <HealableClasses datatype="tokens">Human</HealableClasses> 23 </Heal> 23 24 <Health> 24 25 <Max>600</Max> 25 26 </Health> 26 27 <Identity> 27 28 <Civ>maur</Civ> 28 <Classes datatype="tokens">Human Organic </Classes>29 <Classes datatype="tokens">Human Organic Support</Classes> 29 30 <VisibleClasses datatype="tokens">Hero Healer</VisibleClasses> 30 31 <GenericName>Acharya Chanakya</GenericName> 31 32 <SpecificName>Acharya Chāṇakya</SpecificName> 32 33 <Icon>units/maur_hero_chanakya.png</Icon> 33 34 <Tooltip>Hero Special: "Healer" - Heal units at an accelerated rate. 34 Hero Special: "Teacher" - Empower a building to research and train +50% faster.35 35 Hero Special: "Philosopher" - Research 4 special technologies only available to Chanakya.</Tooltip> 36 36 <RequiredTechnology>phase_city</RequiredTechnology> 37 37 </Identity> 38 38 <Minimap> 39 39 <Type>hero</Type>