Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ChapterMaster.yyp
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,7 @@
{"id":{"name":"spr_explosion2","path":"sprites/spr_explosion2/spr_explosion2.yy",},},
{"id":{"name":"spr_explosion3","path":"sprites/spr_explosion3/spr_explosion3.yy",},},
{"id":{"name":"spr_battle_block","path":"sprites/spr_battle_block/spr_battle_block.yy",},},
{"id":{"name":"scr_gene_obj_creation","path":"scripts/scr_gene_obj_creation/scr_gene_obj_creation.yy",},},
{"id":{"name":"spr_battle_block2","path":"sprites/spr_battle_block2/spr_battle_block2.yy",},},
{"id":{"name":"spr_weapon_storm2","path":"sprites/spr_weapon_storm2/spr_weapon_storm2.yy",},},
{"id":{"name":"spr_rg_mk7_helm","path":"sprites/spr_rg_mk7_helm/spr_rg_mk7_helm.yy",},},
Expand Down Expand Up @@ -1443,6 +1444,6 @@
],
"templateType": null,
"TextureGroups": [
{"resourceType":"GMTextureGroup","resourceVersion":"1.3","name":"Default","autocrop":true,"border":2,"compressFormat":"bz2","customOptions":"","directory":"","groupParent":null,"isScaled":false,"loadType":"default","mipsToGenerate":0,"targets":-1,},
{"resourceType":"GMTextureGroup","resourceVersion":"1.3","name":"Default","autocrop":true,"border":2,"compressFormat":"bz2","directory":"","groupParent":null,"isScaled":false,"loadType":"default","mipsToGenerate":0,"targets":-1,},
],
}
Binary file modified fonts/fnt_menu/fnt_menu.old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified fonts/fnt_menu/fnt_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
69 changes: 2 additions & 67 deletions objects/obj_controller/Alarm_5.gml
Original file line number Diff line number Diff line change
Expand Up @@ -591,73 +591,8 @@ imperial_navy_fleet_construction();
// ** Adeptus Mechanicus Geneseed Tithe **
if (gene_tithe==0) and (faction_status[eFACTION.Imperium]!="War"){
gene_tithe=24;

var expected,txt="",mech_mad=false;
var onceh=0;
expected=max(1,round(obj_controller.gene_seed/20));
if (obj_controller.faction_status[eFACTION.Mechanicus]=="War") then mech_mad=true;

if (obj_controller.gene_seed<=0) or (mech_mad==true){
onceh=2;
gene_iou+=1;
loyalty-=2;
loyalty_hidden-=2;
txt="No Gene-Seed for Adeptus Mechanicus tithe. High Lords of Terra IOU increased to "+string(gene_iou)+".";
}
if (mech_mad==false){
if (obj_controller.gene_seed>0) and (und_gene_vaults==0) and (onceh==0){
obj_controller.gene_seed-=expected;
onceh=1;
if (obj_controller.gene_seed>=gene_iou) and (gene_iou>0){
expected+=gene_iou;
obj_controller.gene_seed-=gene_iou;
gene_iou=0;
onceh=3;
}
for(var i=0; i<50; i++){
if (obj_controller.gene_seed<gene_iou) and (obj_controller.gene_seed>0) and (gene_iou>0){
expected+=1;
obj_controller.gene_seed-=1;
gene_iou-=1;
if (gene_iou==0) then onceh=3;
}
}

if (gene_iou<0) then gene_iou=0;

txt=string(expected)+" Gene-Seed sent to Adeptus Mechanicus for tithe.";
if (gene_iou>0) then txt+=" IOU remains at "+string(gene_iou)+".";
if (onceh==3) then txt+=" IOU has been payed off.";
}

if (obj_controller.gene_seed>0) and (und_gene_vaults>0) and (onceh==0){
expected=1;
obj_controller.gene_seed-=expected;
onceh=1;

if (obj_controller.gene_seed<gene_iou) and (obj_controller.gene_seed>0) and (gene_iou>0){
expected+=1;
obj_controller.gene_seed-=1;
gene_iou-=1;
if (gene_iou==0) then onceh=3;
}

if (gene_iou<0) then gene_iou=0;

txt=string(expected)+" Gene-Seed sent to Adeptus Mechanicus for tithe.";
if (gene_iou>0) then txt+=" IOU remains at "+string(gene_iou)+".";
if (onceh==3) then txt+=" IOU has been payed off.";
}

if (onceh!=2){
scr_alert("green","tithes",txt,0,0);
scr_event_log("",txt);
}
if (onceh==2){
scr_alert("red","tithes",txt,0,0);
scr_event_log("red",txt);
}
}
gene_stock.mechanicus_tithes();

}
if (gene_sold>0){
disc=0;
Expand Down
21 changes: 16 additions & 5 deletions objects/obj_controller/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -1434,12 +1434,23 @@ if (global.custom=1){
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("Obliterated") then gene_seed=floor(random_range(50,200));
if (global.chapter_name=="Lamenters") then gene_seed=30;
if (global.chapter_name=="Soul Drinkers") then gene_seed=60;
gene_stock = new GeneStock();
var _gene_count = 20;

if (scr_has_disadv("Sieged")){
_gene_count= irandom_range(250,400);
}

if (scr_has_disadv("Obliterated")){
_gene_count= irandom_range(50,200);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should obliterated really have less gene-seed available on start than even sieged?

}
if (global.chapter_name=="Lamenters") then _gene_count=30;
if (global.chapter_name=="Soul Drinkers") then _gene_count=60;


repeat(_gene_count){
gene_stock.new_gene_seed();
}
// ** sets up the starting squads**
squads = true;
game_start_squads();
Expand Down
5 changes: 3 additions & 2 deletions objects/obj_controller/Draw_64.gml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ if (!zoomed && !zui){
// Draws the current gene seed
draw_sprite(spr_new_resource,2,355,17);
draw_set_color(c_red);
draw_text(370,16,string_hash_to_newline(string(gene_seed)));
draw_text(370.5,16.5,string_hash_to_newline(string(gene_seed)));
var _gene_count = $"{gene_seed_count()}";
draw_text(370,16,_gene_count);
draw_text(370.5,16.5,_gene_count);
// Draws the current marines in your command
draw_sprite(spr_new_resource,3,475-10,17);
draw_set_color(16291875);
Expand Down
8 changes: 4 additions & 4 deletions objects/obj_controller/Mouse_50.gml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if (menu==12) and (cooldown<=0) and (penitorium>0){
// ** Recruitement **
else if (menu==15) and (cooldown<=0){
if (mouse_x>=xx+748) and (mouse_x<xx+772){
if (mouse_y>=yy+355) and (mouse_y<yy+373) and (recruiting<5) and (gene_seed>0) and (obj_ini.doomed==0) and (string_count("|",recruiting_worlds)>0) and (penitent==0){
if (mouse_y>=yy+355) and (mouse_y<yy+373) and (recruiting<5) and (gene_seed_count()>0) and (obj_ini.doomed==0) and (string_count("|",recruiting_worlds)>0) and (penitent==0){
cooldown=8000;
recruiting+=1;
income_recruiting-=2*(string_count("|",recruiting_worlds));
Expand Down Expand Up @@ -335,7 +335,7 @@ if (menu==20) and (diplomacy>0) or ((diplomacy<-5) and (diplomacy>-6)) and (cool
}

trade_req=requisition;
trade_gene=gene_seed;
trade_gene=gene_seed_count();
trade_chip=stc_wargear_un+stc_vehicles_un+stc_ships_un;
trade_info=info_chips;

Expand Down Expand Up @@ -483,7 +483,7 @@ if (menu==20) and (diplomacy>0) or ((diplomacy<-5) and (diplomacy>-6)) and (cool
trade_take[1]="Artifact";
trade_tnum[1]=1;
trade_req=requisition;
trade_gene=gene_seed;
trade_gene=gene_seed_count();
trade_chip=info_chips;
trade_info=stc_wargear_un+stc_vehicles_un+stc_ships_un;
}
Expand Down Expand Up @@ -631,7 +631,7 @@ if (menu==20) and (diplomacy>0) or ((diplomacy<-5) and (diplomacy>-6)) and (cool
click2=1;
trade_likely="";
trade_req=requisition;
trade_gene=gene_seed;
trade_gene=gene_seed_count();
trade_chip=stc_wargear_un+stc_vehicles_un+stc_ships_un;
trade_info=info_chips;

Expand Down
14 changes: 11 additions & 3 deletions objects/obj_controller/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,20 @@ else if (cheatcode == "req" && global.cheat_req == 1){
}
if (cheatcode == "seed" && global.cheat_gene == 0){
global.cheat_gene = 1;
obj_controller.tempGene_seed = obj_controller.gene_seed;
obj_controller.gene_seed = 9999;
obj_controller.tempGene_seed = gene_seed_count();
with(obj_controller.gene_stock){
repeat(9999){
new_gene_seed();
}
}
}
else if (cheatcode == "seed" && global.cheat_gene == 1){
global.cheat_gene = 0;
obj_controller.gene_seed = obj_controller.tempGene_seed;
with(obj_controller.gene_stock){
repeat(obj_controller.tempGene_seed){
new_gene_seed();
}
}
}
if (cheatcode == "dep"){
global.cheat_disp = 1;
Expand Down
3 changes: 3 additions & 0 deletions objects/obj_creation/Draw_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,9 @@ try {
}
}

if (slide=5){
scr_gene_obj_creation();
}
var x1, x2, x3, x4, x6, y1, y2, y3, y4, y6, bs, see_size, total_max, current, top;

x1 = 1111;
Expand Down
46 changes: 23 additions & 23 deletions objects/obj_ncombat/Alarm_5.gml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ if (ground_mission){

seed_saved=(min(seed_max,apothecaries_alive*40))-gene_penalty;
if (obj_ini.doomed) then seed_saved=0;
if (seed_saved>0) then obj_controller.gene_seed+=seed_saved;
if (seed_saved>0){
gene_seed_count()+=seed_saved;
}

if (obj_ini.doomed && !apothecaries_alive){
part3=$"Chapter Mutation prevents retrieving Gene-Seed. {seed_max} Gene-Seed lost.";
Expand Down Expand Up @@ -83,7 +85,8 @@ if (red_thirst>2){

newline=voodoo;newline_color="red";
scr_newtext();
newline=" ";scr_newtext();
newline=" ";
scr_newtext();
}


Expand All @@ -92,7 +95,7 @@ if (vehicle_deaths>0 || vehicles_saved>0){
if (techmarines_alive=1) then part4+=" ("+string(roles[16])+" prevented the destruction of "+string(vehicles_saved)+")";
if (techmarines_alive>1) then part4+=" ("+string(roles[16])+"s prevented the destruction of "+string(vehicles_saved)+")";

var i;i=0;
var i=0;
repeat(30){i+=1;
if (post_unit_lost[i]!="") and (post_units_lost[i]>0) and (post_unit_veh[i]=1){
part5+=string(post_units_lost[i])+"x "+string(post_unit_lost[i])+", ";
Expand Down Expand Up @@ -187,25 +190,18 @@ if (slime>0){
instance_activate_object(obj_star);


var reduce_fortification=true;
if (battle_special="tyranid_org") then reduce_fortification=false;
if (string_count("_attack",battle_special)>0) then reduce_fortification=false;
if (battle_special="ship_demon") then reduce_fortification=false;
if (enemy+threat=17) then reduce_fortification=false;
if (battle_special="ruins") then reduce_fortification=false;
if (battle_special="ruins_eldar") then reduce_fortification=false;
if (battle_special="fallen1") then reduce_fortification=false;
if (battle_special="fallen2") then reduce_fortification=false;
if (battle_special="study2a") then reduce_fortification=false;
if (battle_special="study2b") then reduce_fortification=false;

var _non_fortification_destroying_battles = ["tyranid_org", "ship_demon","ruins","ruins_eldar","fallen1","fallen2","study2a","study2b"];
var reduce_fortification=!array_contains(_non_fortification_destroying_battles, battle_special);
if (reduce_fortification){
if (string_count("_attack",battle_special)>0) then reduce_fortification=false;
if (enemy+threat=17) then reduce_fortification=false;
}



if (fortified>0) and (!instance_exists(obj_nfort)) and (reduce_fortification=true){
part9="Fortification level of "+string(battle_loc);
if (battle_id=1) then part9+=" I";
if (battle_id=2) then part9+=" II";
if (battle_id=3) then part9+=" III";
if (battle_id=4) then part9+=" IV";
if (battle_id=5) then part9+=" V";
part9=$"Fortification level of {battle_loc} , scr_roman(battle_id)";
part9+=$" has decreased to {fortified-1} ({fortified}-1)";
newline=part9;
scr_newtext();
Expand Down Expand Up @@ -723,8 +719,8 @@ if (obj_ini.fleet_type != ePlayerBase.home_world) and (defeat==1) and (dropping=
battle_object.p_feature[obj_ncombat.battle_id][monastery_list[mon]].status="destroyed";
}

if (obj_controller.und_gene_vaults=0) then newline="Your Fortress Monastery has been raided. "+string(obj_controller.gene_seed)+" Gene-Seed has been destroyed or stolen.";
if (obj_controller.und_gene_vaults>0) then newline="Your Fortress Monastery has been raided. "+string(floor(obj_controller.gene_seed/10))+" Gene-Seed has been destroyed or stolen.";
if (obj_controller.und_gene_vaults=0) then newline="Your Fortress Monastery has been raided. "+string(gene_seed_count())+" Gene-Seed has been destroyed or stolen.";
if (obj_controller.und_gene_vaults>0) then newline="Your Fortress Monastery has been raided. "+string(floor(gene_seed_count()/10))+" Gene-Seed has been destroyed or stolen.";

scr_event_log("red",newline, battle_object.name);
instance_activate_object(obj_event_log);
Expand Down Expand Up @@ -778,7 +774,11 @@ if (obj_ini.fleet_type != ePlayerBase.home_world) and (defeat==1) and (dropping=
//all Gene Pod Incubators and gene seed are lost
destroy_all_gene_slaves(false);
}
if (obj_controller.und_gene_vaults>0) then obj_controller.gene_seed-=floor(obj_controller.gene_seed/10);
if (obj_controller.und_gene_vaults>0){
with (obj_controller.gene_stock){
remove_gene_seed(floor(gene_seed_count()/10));
}
}
}
}
instance_deactivate_object(obj_star);
Expand Down
2 changes: 1 addition & 1 deletion objects/obj_p_assra/Alarm_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ for (o=0;o<array_length(origin.board_co);o++){

scr_kill_unit(co,i)

if (obj_fleet.capital+obj_fleet.frigate+obj_fleet.escort>0) then obj_controller.gene_seed+=seed_max;
if (obj_fleet.capital+obj_fleet.frigate+obj_fleet.escort>0) then gene_seed_count()+=seed_max;
}else if (apothecary>0){
unit.add_or_sub_health(irandom_range(9,14));
apothecary-=0.5;
Expand Down
6 changes: 3 additions & 3 deletions objects/obj_p_ship/Alarm_3.gml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ if (hp<maxhp) and (ship_id!=0){

if (hp<=0) then obj_fleet.ship_lost[ship_id]=1;

if (ship_id=1) and (obj_ini.fleet_type = ePlayerBase.home_world) and (obj_ini.ship_class[1]="Battle Barge"){
if (ship_id=0) and (obj_ini.fleet_type = ePlayerBase.home_world) and (obj_ini.ship_class[0]="Battle Barge"){

if (obj_controller.und_gene_vaults=0){
obj_controller.gene_seed=0;
gene_seed_count()=0;
destroy_all_gene_slaves(false);
}
if (obj_controller.und_gene_vaults>0){
obj_controller.gene_seed-=floor(obj_controller.gene_seed/10);
remove_gene_seed(floor(gene_seed_count()/10));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be something to consider in the future:
Should gene-seed taken by enemy forces be tracked? Player can trade gene-seed with most of factions after all.
And while for most it may be of little use, for CSMs it should be very valuable item that affects their power.

}
}

Expand Down
4 changes: 2 additions & 2 deletions objects/obj_pnunit/Alarm_5.gml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ for (var i=0;i<array_length(unit_struct);i++){
}
}

var destroy;destroy=0;
var destroy=0;
if ((marine_dead[i]>0) or (obj_ncombat.defeat!=0)) and (marine_type[i]!="") and (ally[i]=false){

var comm=false;
Expand All @@ -103,7 +103,7 @@ for (var i=0;i<array_length(unit_struct);i++){
} else if (array_contains([string("Venerable {0}",obj_ini.role[100][6]), "Codiciery", "Lexicanum"], _unit.role())){
recent=false
}
if (recent=true) then scr_recent("death_"+string(marine_type[i]),string(obj_ini.name[marine_co[i],marine_id[i]]),marine_co[i]);
if (recent=true) then scr_recent($"death_{_unit.role_name}");
} else {
obj_ncombat.final_deaths+=1;
}
Expand Down
4 changes: 3 additions & 1 deletion objects/obj_pnunit/Alarm_6.gml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ for (var i=0;i<array_length(veh_type);i++){
//
destroy_vehicle(veh_co[i],veh_id[i]);
}
if (veh_dead[i]=0) and (veh_type[i]!="") and (veh_ally[i]=false){obj_ini.veh_hp[veh_co[i],veh_id[i]]=veh_hp[i]/veh_hp_multiplier[i];}
if (veh_dead[i]=0) and (veh_type[i]!="") and (veh_ally[i]=false){
obj_ini.veh_hp[veh_co[i],veh_id[i]]=veh_hp[i]/veh_hp_multiplier[i];
}
}

/* */
Expand Down
Loading