Skip to content
Merged
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
4 changes: 3 additions & 1 deletion objects/obj_controller/Alarm_5.gml
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,9 @@ if (training_psyker>0){
unit.update_powers();
psyker_aspirant=1;

if (string_count("Abund",obj_ini.strin)>0) then obj_ini.experience[0][g1]+=floor(random(5))+3;
if (scr_has_adv("Psyker Abundance")){
unit.add_exp(irandom_range(5, 8));
}

unit.update_gear("");
unit.update_mobility_item("");
Expand Down
4 changes: 0 additions & 4 deletions objects/obj_controller/KeyPress_73.gml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ if (audio_is_playing(snd_blood)=true) then scr_music("royal",2000);
scr_dialogue("lol");
*/

/*var g;g=0;
repeat(100){g+=1;
show_message(string(obj_ini.role[0,g])+": "+string(obj_ini.experience[0,g]));
}*/


// alarm[7]=1;
Expand Down
2 changes: 1 addition & 1 deletion objects/obj_controller/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ if (menu==1 && (managing>0 || managing<0)){
}
//if (string_count("&",temp[106])>0) then temp[106]=clean_tags(temp[106]);
// Experience
temp[113]=string(floor(unit.experience()));
temp[113]=string(floor(unit.experience));
// Bonuses
temp[119]="";
if (string_length(unit.specials())>0){
Expand Down
11 changes: 6 additions & 5 deletions objects/obj_creation/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,8 @@ ye=99;i=-1;repeat(51){i+=1;
wep2[ye,i]="";
armour[ye,i]="";
gear[ye,i]="";
mobi[ye,i]="";experience[ye,i]=0;
mobi[ye,i]="";

}
ye=100;i=-1;repeat(51){i+=1;
race[ye,i]=1;loc[ye,i]="";
Expand All @@ -679,7 +680,7 @@ ye=100;i=-1;repeat(51){i+=1;
wep2[ye,i]="";
armour[ye,i]="";
gear[ye,i]="";
mobi[ye,i]="";experience[ye,i]=0;
mobi[ye,i]="";
}
ye=101;i=-1;repeat(51){i+=1;
race[ye,i]=1;loc[ye,i]="";
Expand All @@ -688,7 +689,7 @@ ye=101;i=-1;repeat(51){i+=1;
wep2[ye,i]="";
armour[ye,i]="";
gear[ye,i]="";
mobi[ye,i]="";experience[ye,i]=0;
mobi[ye,i]="";
}
ye=102;i=-1;repeat(51){i+=1;
race[ye,i]=1;loc[ye,i]="";
Expand All @@ -697,7 +698,7 @@ ye=102;i=-1;repeat(51){i+=1;
wep2[ye,i]="";
armour[ye,i]="";
gear[ye,i]="";
mobi[ye,i]="";experience[ye,i]=0;
mobi[ye,i]="";
}
ye=103;i=-1;repeat(51){i+=1;
race[ye,i]=1;loc[ye,i]="";
Expand All @@ -706,7 +707,7 @@ ye=103;i=-1;repeat(51){i+=1;
wep2[ye,i]="";
armour[ye,i]="";
gear[ye,i]="";
mobi[ye,i]="";experience[ye,i]=0;
mobi[ye,i]="";
}


Expand Down
4 changes: 2 additions & 2 deletions objects/obj_p_assra/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ if (boarding=true) and (board_cooldown>=0) and (instance_exists(target)) and (in
if (unit.hp()>0){

// Bonuses
difficulty+=unit.experience()/20;
difficulty+=unit.experience/20;
difficulty+=(1-(target.hp/target.maxhp))*33;
//TODO define tag for bording weapons
if (array_contains(["Chainfist","Meltagun","Lascutter","Boarding Shield"], unit.weapon_one())) then difficulty+=3;
Expand Down Expand Up @@ -317,7 +317,7 @@ if (boarding=true) and (board_cooldown>=0) and (instance_exists(target)) and (in
co=origin.board_co[o];
i=origin.board_id[o];
unit = obj_ini.TTRPG[co][i];
unit_exp=unit.experience()
unit_exp=unit.experience
exp_roll=irandom(150+unit_exp)+1;
if (exp_roll>=unit_exp){
if (unit_exp<50){new_exp=experience
Expand Down
2 changes: 1 addition & 1 deletion objects/obj_pnunit/Alarm_5.gml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (obj_ncombat.defeat=0){
if (is_struct(unit)){
if (marine_dead[i]=0) and (obj_ncombat.player_max<obj_ncombat.enemy_max) and (ally[i]==false){
new_exp=0;
cur_exp=unit.experience();
cur_exp=unit.experience;
if (cur_exp>=40) then new_exp+=choose(0,0,1);
if (cur_exp>=20) and (cur_exp<40) then new_exp+=choose(0,1);
if (cur_exp<20) then new_exp+=1;
Expand Down
6 changes: 3 additions & 3 deletions objects/obj_popup/Draw_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ if (zoom=0) and (type=6) and (instance_exists(obj_controller)){
var g=-1,exp_check=0;
for (var g=0;g<array_length(obj_controller.display_unit);g++){
if (obj_controller.man_sel[g]=1 && is_struct(obj_controller.display_unit[g])){
if (obj_controller.display_unit[g].experience()<weapon_one_data.req_exp){
if (obj_controller.display_unit[g].experience<weapon_one_data.req_exp){
exp_check=1;
n_good1=0;
warning=$"A unit must have {weapon_one_data.req_exp}+ EXP to use a {weapon_one_data.name}.";
Expand Down Expand Up @@ -948,7 +948,7 @@ if (zoom=0) and (type=6) and (instance_exists(obj_controller)){
var g,exp_check;g=-1;exp_check=0;
for (var g=0;g<array_length(obj_controller.display_unit);g++){
if (obj_controller.man_sel[g]=1 && is_struct(obj_controller.display_unit[g])){
if (obj_controller.display_unit[g].experience()<weapon_two_data.req_exp){
if (obj_controller.display_unit[g].experience<weapon_two_data.req_exp){
exp_check=1;
n_good1=0;
warning=$"A unit must have {weapon_two_data.req_exp}+ EXP to use a {weapon_two_data.name}.";
Expand Down Expand Up @@ -991,7 +991,7 @@ if (zoom=0) and (type=6) and (instance_exists(obj_controller)){
var g,exp_check;g=-1;exp_check=0;
for (var g=0;g<array_length(obj_controller.display_unit);g++){
if (obj_controller.man_sel[g]=1 && is_struct(obj_controller.display_unit[g])){
if (obj_controller.display_unit[g].experience()<armour_data.req_exp){
if (obj_controller.display_unit[g].experience<armour_data.req_exp){
exp_check=1;
n_good1=0;
warning=$"A unit must have {armour_data.req_exp}+ EXP to use a {armour_data.name}.";
Expand Down
6 changes: 3 additions & 3 deletions objects/obj_popup/Step_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,7 @@ if (image=="new_forge_master"){
if (techs[charisma_pick].charisma < techs[i].charisma){
charisma_pick=i;
}
if (techs[experience_pick].experience() < techs[i].experience()){
if (techs[experience_pick].experience < techs[i].experience){
experience_pick=i;
}
if (techs[talent_pick].technology < techs[i].technology){
Expand Down Expand Up @@ -1416,9 +1416,9 @@ if (image=="new_forge_master"){
skill_lack++;
cur_tech.loyalty-=cur_tech.technology-pick.technology;
}
if (pick.experience()<cur_tech.experience()){
if (pick.experience<cur_tech.experience){
exp_lack++;
cur_tech.loyalty-=floor((cur_tech.experience()-pick.experience())/200);
cur_tech.loyalty-=floor((cur_tech.experience-pick.experience)/200);
}
if (charisma_test[0]==2){
dislike++;
Expand Down
19 changes: 9 additions & 10 deletions scripts/scr_add_man/scr_add_man.gml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function scr_add_man(man_role, target_company, spawn_exp, spawn_name, corruption
obj_ini.wep1[target_company][good] = "";
obj_ini.wep2[target_company][good] = "";
obj_ini.armour[target_company][good] = "";
obj_ini.experience[target_company][good] = spawn_exp;
obj_ini.spe[target_company][good] = "";
obj_ini.god[target_company][good] = 0;

Expand All @@ -42,7 +41,7 @@ function scr_add_man(man_role, target_company, spawn_exp, spawn_name, corruption
obj_ini.wep1[target_company][good] = "Hellgun";
obj_ini.wep2[target_company][good] = ""; // Consider giving the poor fellow a "Combat Knife" or other melee weapon
obj_ini.armour[target_company][good] = "Skitarii Armour";
obj_ini.experience[target_company][good] = 10;
spawn_exp = 10;
obj_ini.race[target_company][good] = 3;
unit = new TTRPG_stats("mechanicus", target_company, good, "skitarii");
break;
Expand All @@ -52,7 +51,7 @@ function scr_add_man(man_role, target_company, spawn_exp, spawn_name, corruption
obj_ini.armour[target_company][good] = "Dragon Scales";
obj_ini.gear[target_company][good] = "";
obj_ini.mobi[target_company][good] = "Servo-arm";
obj_ini.experience[target_company][good] = 100;
spawn_exp = 100;
obj_ini.race[target_company][good] = 3;
unit = new TTRPG_stats("mechanicus", target_company, good, "tech_priest");
break
Expand All @@ -61,7 +60,7 @@ function scr_add_man(man_role, target_company, spawn_exp, spawn_name, corruption
obj_ini.wep1[target_company][good] = "Power Sword";
obj_ini.armuor[target_company][good] = "Power Armour"; // Might want to create "Light Power Armour" that is suited for squishy humans
obj_ini.gear[target_company][good] = "Storm Shield";
obj_ini.experience[target_company][good] = 10;
spawn_exp = 10;
obj_ini.race[target_company][good] = 4;
unit = new TTRPG_stats("inquisition", target_company, good, "inquisition_crusader");
break;
Expand All @@ -70,15 +69,15 @@ function scr_add_man(man_role, target_company, spawn_exp, spawn_name, corruption
obj_ini.wep1[target_company][good] = "Bolter"; // Might want to create a "Light Bolter" variant for this one
obj_ini.wep2[target_company][good] = "Sarissa";
obj_ini.armour[target_company][good] = "Power Armour"; // Same here, Sororitas are glorified guard
obj_ini.experience[target_company][good] = 60;
spawn_exp = 60;
obj_ini.race[target_company][good] = 5;
unit = new TTRPG_stats("adeptus_sororitas", target_company, good, "sister_of_battle");
break;
case "Sister Hospitaler":
obj_ini.wep1[target_company][good] = "Bolter"; // Same here
obj_ini.wep2[target_company][good] = "Sarissa";
obj_ini.armour[target_company][good] = "Power Armour"; // Same here
obj_ini.experience[target_company][good] = 100;
spawn_exp = 100;
obj_ini.gear[target_company][good] = "Sororitas Medkit";
obj_ini.race[target_company][good] = 5;
unit = new TTRPG_stats("adeptus_sororitas", target_company, good, "sister_hospitaler");
Expand All @@ -89,7 +88,7 @@ function scr_add_man(man_role, target_company, spawn_exp, spawn_name, corruption
obj_ini.wep1[target_company][good] = "Ranger Long Rifle";
obj_ini.wep2[target_company][good] = "Shuriken Pistol";
obj_ini.armour[target_company][good] = ""; // I should add "Eldar Armour" to the fellow too
obj_ini.experience[target_company][good] = 80;
spawn_exp = 80;
obj_ini.race[target_company][good] = 6
unit = new TTRPG_stats("mechanicus", target_company, good, "skitarii_ranger");
break;
Expand All @@ -98,15 +97,15 @@ function scr_add_man(man_role, target_company, spawn_exp, spawn_name, corruption
obj_ini.wep1[target_company][good] = "Sniper Rifle";
obj_ini.wep2[target_company][good] = "Choppa";
obj_ini.armour[target_company][good] = ""; // Consider giving "Ork Armour" to the fellow
obj_ini.experience[target_company][good] = 20;
spawn_exp = 20;
obj_ini.race[target_company][good] = 7;
unit = new TTRPG_stats("ork", target_company, good, "ork_Sniper");
break;
case "Flash Git":
obj_ini.wep1[target_company][good] = "Snazzgun";
obj_ini.wep2[target_company][good] = "Choppa";
obj_ini.armour[target_company][good] = "Ork Armour";
obj_ini.experience[target_company][good] = 40;
spawn_exp = 40;
obj_ini.race[target_company][good] = 7;
unit = new TTRPG_stats("ork", target_company, good, "flash_git");
break;
Expand Down Expand Up @@ -249,7 +248,7 @@ function scr_add_man(man_role, target_company, spawn_exp, spawn_name, corruption
marines += 1;
}
obj_ini.TTRPG[target_company][good] = unit;

unit.add_exp(spawn_exp);
unit.allocate_unit_to_fresh_spawn(home_spot);
with(obj_ini) {
scr_company_order(target_company);
Expand Down
4 changes: 2 additions & 2 deletions scripts/scr_civil_roster/scr_civil_roster.gml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function scr_civil_roster(_unit_location, _target_location, _is_planet) {
targ.dudes[targ.men]=unit.role();
targ.dudes_num[targ.men]=1;
targ.dudes_hp[targ.men]=unit.hp();
targ.dudes_exp[targ.men]=deploying_unit.experience[cooh,va];
targ.dudes_exp[targ.men]=unit.experience;
targ.dudes_powers[targ.men]=deploying_unit.spe[cooh,va];
targ.dudes_wep1[targ.men]=deploying_unit.wep1[cooh,va];
targ.dudes_wep2[targ.men]=deploying_unit.wep2[cooh,va];
Expand Down Expand Up @@ -359,7 +359,7 @@ function scr_civil_roster(_unit_location, _target_location, _is_planet) {
targ.marine_gear[targ.men] = deploying_unit.gear[cooh][va];
targ.marine_mobi[targ.men] = unit.mobility_item();
targ.marine_hp[targ.men] = unit.hp();
targ.marine_exp[targ.men] = deploying_unit.experience[cooh][va];
targ.marine_exp[targ.men] = unit.experience;
targ.marine_powers[targ.men] = deploying_unit.spe[cooh][va];
targ.marine_ranged[targ.men] = unit.ranged_attack();
targ.marine_ac[targ.men]=unit.armour_calc();
Expand Down
2 changes: 0 additions & 2 deletions scripts/scr_company_order/scr_company_order.gml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function temp_marine_variables(co, unit_num){
array_push(temp_wep2,wep2[co][unit_num]);
array_push(temp_armour,armour[co][unit_num]);
array_push(temp_gear,gear[co][unit_num]);
array_push(temp_experience,experience[co][unit_num]);
array_push(temp_age,age[co][unit_num]);
array_push(temp_mobi,mobi[co][unit_num]);
array_push(temp_spe,spe[co][unit_num]);
Expand Down Expand Up @@ -289,7 +288,6 @@ function scr_company_order(company) {
armour[co][i]=temp_armour[i];
gear[co][i]=temp_gear[i];
mobi[co][i]=temp_mobi[i];
experience[co][i]=temp_experience[i];
age[co][i]=temp_age[i];
spe[co][i]=temp_spe[i];
god[co][i]=temp_god[i];
Expand Down
6 changes: 3 additions & 3 deletions scripts/scr_company_view/scr_company_view.gml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function add_man_to_manage_arrays(unit){
array_push(ma_health,unit.hp());
array_push(ma_mobi,unit.mobility_item());
array_push(ma_chaos,unit.corruption);
array_push(ma_exp,unit.experience());
array_push(ma_exp,unit.experience);
array_push(ma_promote,0);
array_push(display_unit,unit);
array_push(ma_god,0);
Expand Down Expand Up @@ -325,13 +325,13 @@ function other_manage_data(){
else if (unit.company >= 6) then target_company = 5;
else if (unit.company >= 2) then target_company = 1;
var promotion_limit = company_promotion_limits[target_company]
if (unit.experience()>=promotion_limit && promotion_limit>0){
if (unit.experience>=promotion_limit && promotion_limit>0){
ma_promote[v]=1;
}
if (ma_health[v]<=10) then ma_promote[v]=10;
} else if (ma_role[v]=obj_ini.role[100][5]){
var promotion_limit = company_promotion_limits[unit.company - 1]
if (unit.experience()>=promotion_limit+25 && promotion_limit>0){
if (unit.experience>=promotion_limit+25 && promotion_limit>0){

}
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/scr_crusade/scr_crusade.gml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function scr_crusade() {
//TODO figure out how to quantify and present these risks so the player knows to protect dudes with trait
if (unit.has_trait("very_hard_to_kill")) then death_determination-=20;
death_determination_2=death_determination;
death_determination-=(unit.experience()/2);
death_determination-=(unit.experience/2);

//more generalised trait bonus mainly linked to chapter advantage of same name
if (unit.has_trait("slow_and_purposeful")) then death_determination-=10;
Expand Down
2 changes: 1 addition & 1 deletion scripts/scr_draw_armentarium/scr_draw_armentarium.gml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function calculate_research_points(turn_end=false){
if (struct_exists(gen_data,"crafter")) then crafters++;
if (struct_exists(gen_data,"at_forge")){
at_forge++;
master_craft_chance += (techs[i].experience()/50)
master_craft_chance += (techs[i].experience/50)
}
forge_points += forge_point_gen[0];
if (techs[i].has_trait("tech_heretic")){
Expand Down
2 changes: 1 addition & 1 deletion scripts/scr_garrison/scr_garrison.gml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function GarrisonForce(planet_operatives, turn_end=false, type="garrison") const
}
}
}else if (hierarchy[leader_hier_pos]==unit.role()){
if (garrison_leader.experience()<unit.experience()){
if (garrison_leader.experience<unit.experience){
garrison_leader=unit;
}
}else{
Expand Down
Loading