Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Hacky attempt at a power rebalancing

  • Loading branch information...
commit f6d6c0918f32eec697219374d2388d048d2fea1d 1 parent f20d737
@perim perim authored
View
34 data/mp/multiplay/skirmish/rules.js
@@ -92,13 +92,6 @@ function eventGameInit()
"R-Wpn-Rocket-Damage01",
"R-Defense-WallTower01");
- if (baseType == CAMP_CLEAN)
- {
- // No HQ, so no design or radar
- setMiniMap(false);
- setDesign(false);
- }
-
for (var playnum = 0; playnum < maxPlayers; playnum++)
{
enableResearch("R-Sys-Sensor-Turret01", playnum);
@@ -109,9 +102,10 @@ function eventGameInit()
makeComponentAvailable("CyborgSpade", playnum);
makeComponentAvailable("CyborgRepair", playnum);
+ setPower(500, playnum);
+
if (baseType == CAMP_CLEAN)
{
- setPower(1300, playnum);
for (var count = 0; count < numCleanTech; count++)
{
completeResearch(techlist[count], playnum);
@@ -121,9 +115,9 @@ function eventGameInit()
for (var i = 0; i < structs.length; i++)
{
var s = structs[i];
- if (playerData[playnum].difficulty != INSANE
+ if ((playerData[playnum].difficulty != INSANE && s.stattype != HQ)
|| (s.stattype != WALL && s.stattype != DEFENSE && s.stattype != GATE
- && s.stattype != RESOURCE_EXTRACTOR))
+ && s.stattype != RESOURCE_EXTRACTOR && s.stattype != HQ))
{
removeStruct(s);
}
@@ -131,7 +125,6 @@ function eventGameInit()
}
else if (baseType == CAMP_BASE)
{
- setPower(2500, playnum);
for (var count = 0; count < numBaseTech; count++)
{
completeResearch(techlist[count], playnum);
@@ -150,7 +143,6 @@ function eventGameInit()
}
else // CAMP_WALLS
{
- setPower(2500, playnum);
for (var count = 0; count < techlist.length; count++)
{
completeResearch(techlist[count], playnum);
@@ -242,21 +234,3 @@ function eventAttacked(victimObj, attackerObj)
}
}
}
-
-function eventStructureBuilt(struct)
-{
- if (struct.player == selectedPlayer && struct.type == STRUCTURE && struct.stattype == HQ)
- {
- setMiniMap(true); // show minimap
- setDesign(true); // permit designs
- }
-}
-
-function eventDestroyed(victim)
-{
- if (victim.player == selectedPlayer && victim.type == STRUCTURE && victim.stattype == HQ)
- {
- setMiniMap(false); // hide minimap if HQ is destroyed
- //setDesign(false); // and disallow design
- }
-}
View
2  data/mp/stats/sensor.txt
@@ -13,7 +13,7 @@ SensorTower2Mk1,Level All,5,25,100,1,5,200,GNLSNSR1.PIE,TRMSNSR2.PIE,2048,TURRET
Sensor-WideSpec,Level All,5,25,100,1,5,200,GNHSNSR4.PIE,TRHSNSR3.PIE,2260,TURRET,SUPER,0,100,1
NavGunSensor,Level All,0,0,0,1,1,0,0,0,2048,DEFAULT,STANDARD,0,500,0
DefaultSensor1Mk1,Level All,0,0,0,1,1,0,0,0,1024,DEFAULT,STANDARD,0,500,0
-CCSensor,Level All,1,1,1,1,1,200,misensor.PIE,TRLSNSR1.PIE,3072,TURRET,STANDARD,0,1000,0
+CCSensor,Level All,1,1,1,1,1,200,misensor.PIE,TRLSNSR1.PIE,1536,TURRET,STANDARD,0,1000,0
BaBaSensor,Level All,1,1,1,1,1,1,0,0,640,DEFAULT,STANDARD,0,100,0
TowerSensor,Level All,0,0,0,1,1,0,0,0,1280,DEFAULT,STANDARD,0,500,0
FortressSensor,Level All,0,0,0,1,1,0,0,0,1536,DEFAULT,STANDARD,0,500,0
View
4 data/mp/stats/structures.txt
@@ -24,12 +24,12 @@ A0HardcreteMk1Gate,GATE,Level All,HARD,1,1,1,Concrete,250,2,15,700,10,25,1,0,255
A0HardcreteMk1Wall,WALL,Level All,HARD,1,1,1,Concrete,125,2,15,700,10,25,1,0,255,0,ZNULLECM,ZNULLSENSOR,0,blwallh.pie@blwallc1.pie@blwallh_t.pie@blwallh_l.pie,0,1,0
A0LasSatCommand,DOOR,Level All,MEDIUM,1,2,2,Concrete,2500,2,16,1000,10,1000,1,0,255,0,ZNULLECM,0,1,milasbas.pie,0,0,1
A0LightFactory,FACTORY,Level All,MEDIUM,1,3,3,Concrete,500,3,10,1000,100,100,30,150,255,20,ZNULLECM,BaBaSensor,1,blfact0.pie@factory_module1.pie@blfact1.pie@factory_module2.pie@blfact2.pie,blbfact.pie,1,0
-A0PowerGenerator,POWER GENERATOR,Level All,MEDIUM,1,2,2,Concrete,500,2,20,1000,30,50,30,300,255,10,ZNULLECM,DefaultSensor1Mk1,0,blpower0.pie@power_module4.pie@blpower4.pie,blbpower.pie,1,0
+A0PowerGenerator,POWER GENERATOR,Level All,MEDIUM,1,2,2,Concrete,500,2,20,1000,30,200,30,300,255,10,ZNULLECM,DefaultSensor1Mk1,0,blpower0.pie@power_module4.pie@blpower4.pie,blbpower.pie,1,0
A0PowMod1,POWER MODULE,Level All,MEDIUM,0,2,2,Concrete,250,2,10,1000,0,0,0,150,255,0,ZNULLECM,DefaultSensor1Mk1,0,blpower4.pie,0,1,0
A0RepairCentre3,REPAIR FACILITY,Level All,MEDIUM,0,1,1,Concrete,500,2,10,1000,0,100,0,150,255,0,RepairCentre,DefaultSensor1Mk1,0,BLRPAIR3.PIE,BLBGEN.PIE,1,0
A0ResearchFacility,RESEARCH,Level All,MEDIUM,1,2,2,Concrete,500,2,10,800,100,100,30,150,255,10,ZNULLECM,DefaultSensor1Mk1,0,blresch0.pie@research_module4.pie@blresch4.pie,blbresch.pie,1,0
A0ResearchModule1,RESEARCH MODULE,Level All,MEDIUM,1,2,2,Concrete,250,2,10,800,50,100,5,150,255,5,ZNULLECM,DefaultSensor1Mk1,0,blresch4.pie,0,1,0
-A0ResourceExtractor,RESOURCE EXTRACTOR,Level All,MEDIUM,0,1,1,Concrete,100,1,5,600,10,0,2,150,255,1,ZNULLECM,DefaultSensor1Mk1,0,BLDERIK.PIE,0,1,0
+A0ResourceExtractor,RESOURCE EXTRACTOR,Level All,MEDIUM,0,1,1,Concrete,100,1,5,600,100,100,2,150,255,1,ZNULLECM,DefaultSensor1Mk1,0,BLDERIK.PIE,0,1,0
A0Sat-linkCentre,SAT UPLINK,Level All,MEDIUM,0,2,2,Concrete,1250,3,12,1600,10,1000,30,0,1,1,ZNULLECM,UplinkSensor,0,miupbase.PIE,0,0,0
A0TankTrap,WALL,Level All,HARD,1,1,1,Concrete,40,1,10,200,10,15,1,0,255,0,ZNULLECM,ZNULLSENSOR,0,MITRAP2.PIE,0,1,0
A0VTolFactory1,VTOL FACTORY,Level All,MEDIUM,1,3,3,Concrete,500,3,10,500,100,100,30,150,255,20,ZNULLECM,DefaultSensor1Mk1,1,blvfact0.pie@vtolfactory_module1.pie@blvfact1.pie@vtolfactory_module2.pie@blvfact2.pie,blbfact.pie,1,0
View
14 src/power.cpp
@@ -271,6 +271,15 @@ void updatePlayerPower(UDWORD player)
{
updateCurrentPower((POWER_GEN *)psStruct->pFunctionality, player);
}
+ else if (psStruct->pStructureType->type == REF_HQ && psStruct->status == SS_BUILT)
+ {
+ asPower[player].currentPower += 2 * EXTRACT_POINTS * FP_ONE / GAME_UPDATES_PER_SEC;
+ }
+ ASSERT(asPower[player].currentPower >= 0, "negative power");
+ if (asPower[player].currentPower > MAX_POWER*FP_ONE)
+ {
+ asPower[player].currentPower = MAX_POWER*FP_ONE;
+ }
}
syncDebug("updatePlayerPower%u %"PRId64"->%"PRId64"", player, powerBefore, asPower[player].currentPower);
@@ -306,11 +315,6 @@ static void updateCurrentPower(POWER_GEN *psPowerGen, UDWORD player)
syncDebug("updateCurrentPower%d = %"PRId64",%u", player, extractedPower, psPowerGen->multiplier);
asPower[player].currentPower += (extractedPower * psPowerGen->multiplier) / 100;
- ASSERT(asPower[player].currentPower >= 0, "negative power");
- if (asPower[player].currentPower > MAX_POWER*FP_ONE)
- {
- asPower[player].currentPower = MAX_POWER*FP_ONE;
- }
}
void setPower(unsigned player, int32_t power)
Please sign in to comment.
Something went wrong with that request. Please try again.