Skip to content

Commit

Permalink
feat: Chapter traits #6 (#491)
Browse files Browse the repository at this point in the history
Co-authored-by: EttyKitty <20323032+EttyKitty@users.noreply.github.com>
  • Loading branch information
KRdaMystic and EttyKitty authored Feb 19, 2025
1 parent 1e4d6e5 commit 9523d8b
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 4 deletions.
4 changes: 3 additions & 1 deletion objects/obj_controller/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -1435,8 +1435,10 @@ loyalty=100;
loyalty_hidden=100;// Updated when inquisitors do an inspection
// ** Sets up gene seed **
gene_seed=20;
if (scr_has_disadv("Sieged")) then gene_seed = floor(random_range(250, 400));
if scr_has_disadv("Sieged") then gene_seed=floor(random_range(250,400));
if scr_has_disadv("Obliterated") then gene_seed=floor(random_range(50,200));
if scr_has_disadv("Serpents Delight") then gene_seed=floor(random_range(50,250));
if scr_has_disadv("Enduring Angels") then gene_seed=floor(random_range(50,250));
if (global.chapter_name=="Lamenters") then gene_seed=30;
if (global.chapter_name=="Soul Drinkers") then gene_seed=60;

Expand Down
32 changes: 31 additions & 1 deletion objects/obj_creation/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,37 @@ var all_disadvantages = [
description : "Whether due to being cut off from forge worlds or bad luck, your chapter no longer has enough high quality gear to go around. Your elite troops will have to make do with standard armour.",
value: 10,
meta : ["Gear Quality"]
}
},
{
name : "Enduring Angels",
description : "The Chapter's journey thus far has been arduous & unforgiving leaving them severely understrength yet not out of the fight. You begin with 5 fewer company's",
value : 50,
meta : ["Status"],
},
{
name : "Serpents Delight",
description : "Sleeper cells infiltrated your chapter. When they rose up for the decapitation strike,they slew the 5 most experienced company's and many of the HQ staff before being defeated",
value : 70,
meta : ["Status"],
},
{
name : "Weakened Apothecarion",
description : "Many of your chapter's Apothecaries have fallen in recent battles whether due to their incompetence or deliberate targetting.",
value : 25,
meta : ["Apothecaries"],
},
{
name : "Small Reclusiam",
description : "Your chapter cares little for its reclusiam compared to other chapters fewer marines have shown the desire to be chaplains.",
value : 25,
meta : ["Faith"],
},
{
name : "Barren Librarius",
description : "Your chapter has a smaller Librarius compared to other chapters due to having fewer potent psykers.",
value : 25,
meta : ["Librarians"],
},
]

obj_creation.all_disadvantages = []
Expand Down
42 changes: 41 additions & 1 deletion scripts/scr_initialize_custom/scr_initialize_custom.gml
Original file line number Diff line number Diff line change
Expand Up @@ -957,11 +957,44 @@ function scr_initialize_custom() {
assault = 0;
devastator = 0;
}

if scr_has_disadv("Enduring Angels") {
fifth = 0;
sixth = 0;
seventh = 0;
eighth = 0;
ninth = 0;
}
if scr_has_disadv("Serpents Delight") {
techmarines -= 5;
epistolary -= 1;
lexicanum -= 3;
apothecary -= 5;
chaplains -= 5;
terminator = 0;
veteran = 0;
second = 0;
third = 0;
fourth = 0;
tenth = 0;
}
if scr_has_disadv ("Tech-Heresy") {
techmarines -= 5;
tenth += 5;
}
if scr_has_disadv ("Small Apothecarion") {
apothecary -= 5;
tenth += 5;
}
if scr_has_disadv ("Small Librarius") {
epistolary -= 1;
codiciery -= 1;
lexicanum -= 2;
tenth += 5;
}
if scr_has_disadv ("Small Reclusiam") {
chaplains -= 5;
tenth += 5;
}
if scr_has_adv ("Reverent Guardians") {
chaplains += 5;
tenth -= 5;
Expand Down Expand Up @@ -3200,6 +3233,7 @@ function scr_initialize_custom() {
scr_add_item("Psychic Hood", 4);
scr_add_item("Force Staff", 4);
scr_add_item("Plasma Pistol", 4);
scr_add_item("Company Standard", 4);

if(scr_has_adv("Crafters")){
scr_add_item("Tartaros", 10);
Expand Down Expand Up @@ -3349,6 +3383,9 @@ function add_unit_to_company(ttrpg_name, company, slot, role_name, role_id, wep1
if(role_id == eROLE.Champion){
spawn_unit.add_trait("champion");
}
if(role_id == eROLE.Apothecary){
spawn_unit.add_trait("soft_target");
}
if(role_id == eROLE.Librarian){
var let = "";
if (obj_creation.discipline = "default") {
Expand All @@ -3374,6 +3411,9 @@ function add_unit_to_company(ttrpg_name, company, slot, role_name, role_id, wep1
if(scr_has_adv("Psyker Abundance")){
spawn_unit.add_exp(10);
}
if(scr_has_disadv("Barren Librarius")){
spawn_unit.psionic = choose(8, 9, 10, 11,);
}
}

return spawn_unit;
Expand Down
23 changes: 22 additions & 1 deletion scripts/scr_unit_traits/scr_unit_traits.gml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,14 @@ global.trait_list = {
display_name:"Zealous Faith",
flavour_text:"Put great emphasis on their faith, able to draw strength from it in crisis"
},
"faithless":{
technology:2,
wisdom:2,
intelligence:2,
piety:[-5,2,"max"],
display_name:"Faithless",
flavour_text:"Puts great emphasis on a pragmatic and logical approach in place of faith and spiritual beliefs"
},
"feet_floor":{
wisdom:1,
dexterity:-2,
Expand Down Expand Up @@ -315,6 +323,11 @@ global.trait_list = {
technology:[-7,2,"min"],
flavour_text:"Have a deep mistrust and loathing of technology",
},
"soft_target":{
display_name:"Marked for death",
constitution:[-5,2,],
flavour_text:"This Marine can't shake the feeling that his days are numbered; in battle enemy attacks seem to find their way to softer sections of armor",
},
"fast_learner":{
display_name:"Quick Learner",
wisdom:[2,2,"max"],
Expand All @@ -335,7 +348,6 @@ global.trait_list = {
technology:[3,1,"max"],
intelligence:1,
flavour_text:"Engage in study and beliefs considered heretical in the eyes of Mars and the Imperium",
//effect:"bonus to fist type weaponry",
},
"crafter":{
display_name:"Crafter",
Expand Down Expand Up @@ -795,6 +807,15 @@ global.astartes_trait_dist = [
]
}
],
[
"faithless",
[1000,980],
{
"disadvantage":[
"Small Reclusiam",[1000,50],"required"
]
}
],
["flesh_is_weak",[1000,999],{
chapter_name:["Iron Hands",[1000,600],"required"],
progenitor:[ePROGENITOR.IRON_HANDS,[1000,800],"required"],
Expand Down

0 comments on commit 9523d8b

Please sign in to comment.