Skip to content

Commit

Permalink
Routines for Psi training
Browse files Browse the repository at this point in the history
and physical training, because i can.
  • Loading branch information
Warboy1982 committed Oct 29, 2012
1 parent 295be66 commit 221b878
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 8 deletions.
8 changes: 8 additions & 0 deletions bin/data/Ruleset/Xcom1Ruleset.rul
Expand Up @@ -3680,6 +3680,7 @@ armors:
underArmor: 12
drawingRoutine: 1
movementType: 1
modifiedWalk: 15
damageModifier:
- 1.0
- 0.8
Expand All @@ -3700,6 +3701,7 @@ armors:
underArmor: 12
drawingRoutine: 1
movementType: 1
modifiedWalk: 15
damageModifier:
- 1.0
- 0.7
Expand All @@ -3720,6 +3722,7 @@ armors:
underArmor: 16
drawingRoutine: 1
movementType: 1
modifiedWalk: 15
damageModifier:
- 1.0
- 0.6
Expand Down Expand Up @@ -3760,6 +3763,7 @@ armors:
rearArmor: 28
underArmor: 4
drawingRoutine: 5
modifiedWalk: 38
size: 2
damageModifier:
- 1.0
Expand All @@ -3781,6 +3785,7 @@ armors:
underArmor: 90
drawingRoutine: 5
size: 2
modifiedWalk: 23
damageModifier:
- 1.0
- 1.0
Expand Down Expand Up @@ -4056,6 +4061,7 @@ armors:
rearArmor: 35
underArmor: 35
drawingRoutine: 4
modifiedWalk: 15
damageModifier:
- 0.9
- 0.9
Expand All @@ -4075,6 +4081,7 @@ armors:
rearArmor: 40
underArmor: 40
drawingRoutine: 4
modifiedWalk: 15
damageModifier:
- 0.8
- 0.8
Expand All @@ -4094,6 +4101,7 @@ armors:
rearArmor: 40
underArmor: 40
drawingRoutine: 4
modifiedWalk: 15
damageModifier:
- 0.7
- 0.7
Expand Down
15 changes: 10 additions & 5 deletions list of things.txt
@@ -1,13 +1,15 @@
BASESCAPE:
GEOSCAPE:
ufo firing rate decreases by 3 seconds per difficulty level
funding nation withdrawal trigger should be higher on higher levels
make funding nations much harder to please, make them drop out more often, and when they sign a pact, start
generating anti-infiltration missions somewhere in their country (use alien base as a template for how to
generate a hidden mission) at a rate of about 1.5 per month, and start generating military defence missions
every few weeks or so until all anti-infiltration missions are complete, and set the funding nation to "happy"
make funding nations do something


UNITS:
add sailors for port terror missions. give them all knives and surly dispositions.
Cult of Sirius! (rank 8 alien, human cultist, 1 in 6 chance for 3-5 humans)
Inventory screens for all units in game
make aliens pick up weapons if any nearby and none in hand
Expand All @@ -21,6 +23,7 @@ soldiers need a new information section for days dead, and only actually REMOVE


BASE:
make wounded soldiers transferrable (at double the usual time, with no healing en-route) because medical bases
looks like no mechanic exists for psi training? fix. make a method for firearms training while you're at it.
Training Room for xcom agents using similar rules to X-com apocalypse
sattelite defense network? - extra base with free planet wide hyper-wave decode,
Expand All @@ -39,6 +42,8 @@ convert captured aliens to fight for you using BRAINWASHING FACILITY
- cannot convert terror units, chryssalids would go badly.

MAPS:
add expanded terror sites
add port terror site
pester luke for more rotated ships.
mission types: STR_ANTI_INFILTRATION, STR_MILITARY_DEFENCE STR_PURGE, STR_CULTIST_DEFENCE, STR_CULTIST_BASE
make a new map type for ground-based assaults, with a 40x40 tile to represent the base compound on a 60x60 map
Expand All @@ -59,10 +64,10 @@ New ufo layouts for variety
tank shells explode.
new tank type - sectopods! - need to research to construct, recolour of original sprites? (thinking give em a blue visor)
medical bay and doctors added - decreases convalescence time of wounded units based on the number of doctors on hand (current formula is 15 doctors = double heal rate, 40 doctors = triple, 60+ doctors (requires 2 hospitals) = quadruple)
cloning facility added
third map type for terror missions: now has commercial, residential and military base.
researchable disruptor and gauss cannons for hovertanks and crafts
complete armour rework
cloning facility added
third map type for terror missions: now has commercial, residential and military base.
researchable disruptor and gauss cannons for hovertanks and crafts
complete armour rework
complete weapon damage workover
hovertank turret placement fixed.
snakemen slither!
Expand Down
4 changes: 1 addition & 3 deletions src/Resource/XcomResourcePack.cpp
Expand Up @@ -468,9 +468,7 @@ void XcomResourcePack::loadBattlescapeResources()
"XCOM_4.PCK",
"POLICEM.PCK",
"POLICEF.PCK",
"G_SOLDIER.PCK"

};
"G_SOLDIER.PCK"};

for (int i = 0; i < 25; ++i)
{
Expand Down
36 changes: 36 additions & 0 deletions src/Savegame/Soldier.cpp
Expand Up @@ -419,4 +419,40 @@ void Soldier::heal(int factor)
_factor = 0;
}
}

/**
* Trains a soldier's Physical abilities
*/
void Soldier::trainPhys()
{
if(_currentStats.firing < 100 && RNG::generate(0, 100) > _currentStats.firing)
_currentStats.firing++;
if(_currentStats.health < 100 && RNG::generate(0, 100) > _currentStats.health)
_currentStats.health++;
if(_currentStats.melee < 100 && RNG::generate(0, 100) > _currentStats.melee)
_currentStats.melee++;
if(_currentStats.throwing < 100 && RNG::generate(0, 100) > _currentStats.throwing)
_currentStats.throwing++;
if(_currentStats.strength < 100 && RNG::generate(0, 100) > _currentStats.strength)
_currentStats.strength++;
if(_currentStats.tu < 100 && RNG::generate(0, 100) > _currentStats.tu)
_currentStats.tu++;
if(_currentStats.stamina < 100 && RNG::generate(0, 100) > _currentStats.stamina)
_currentStats.stamina++;
}

/**
* Trains a soldier's Psychic abilities
*/
void Soldier::trainPsi()
{
if(_currentStats.psiSkill <= 16)
_currentStats.psiSkill += RNG::generate(16, 24);
else if(_currentStats.psiSkill <= 16)
_currentStats.psiSkill += RNG::generate(5, 12);
else if(_currentStats.psiSkill < 100)
_currentStats.psiSkill += RNG::generate(1, 3);
if(_currentStats.psiSkill > 100)
_currentStats.psiSkill = 100;
}
}
4 changes: 4 additions & 0 deletions src/Savegame/Soldier.h
Expand Up @@ -115,6 +115,10 @@ class Soldier
void setWoundRecovery(int recovery);
/// Heals wound recoveries.
void heal(int factor);
/// Trains a soldier's physical stats
void trainPhys();
/// Trains a soldier's psychic stats
void trainPsi();
};

}
Expand Down

0 comments on commit 221b878

Please sign in to comment.