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
67 changes: 35 additions & 32 deletions objects/obj_drop_select/Alarm_1.gml
Original file line number Diff line number Diff line change
Expand Up @@ -53,42 +53,45 @@ if (arright=false) then formation_current=formation_possible[1];

// show_message("Star: "+string(p_target.name)+", Planet: "+string(planet_number));

var co,i,unit;co=-1;i=0;
repeat(11){co+=1;i=0;
repeat(300){i+=1;
if (i<=100){if (obj_ini.veh_loc[co][i]=p_target.name) and (obj_ini.veh_wid[co][i]=planet_number) and (attack=1){
if (obj_ini.veh_role[co][i]="Land Speeder") then l_speeders+=1;
if (obj_ini.veh_role[co][i]="Rhino") then l_rhinos+=1;
if (obj_ini.veh_role[co][i]="Whirlwind") then l_whirls+=1;
if (obj_ini.veh_role[co][i]="Predator") then l_predators+=1;
if (obj_ini.veh_role[co][i]="Land Raider") then l_raiders+=1;
}}
unit=obj_ini.TTRPG[co][i];
if (unit.name()=="") then continue;
if (obj_ini.loc[co][i]=p_target.name) and (unit.planet_location==planet_number){
if ((attack=0) and (string_count("Bike",obj_ini.role[co][i])=0)) or (attack=1){
if (unit.role()="Chapter Master") then l_master+=1;
if (unit.role()=obj_ini.role[100][2]) then l_honor+=1;
if (unit.role()=obj_ini.role[100][5]) then l_capts+=1;
if (unit.role()="Champion") then l_champions+=1;

if (string_count("Bike",obj_ini.role[co][i])=0) or (attack=0){
if (obj_ini.role[co][i]=obj_ini.role[100][11]) then l_mahreens+=1;
var unit;
for (var co = 0; co <= 10; co++) {
for (var i = 0; i <= 300; i++) {
if (i <= 100) {
if (obj_ini.veh_loc[co][i] = p_target.name) && (obj_ini.veh_wid[co][i] = planet_number) && (attack = 1) {
if (obj_ini.veh_role[co][i] = "Land Speeder") then l_speeders += 1;
if (obj_ini.veh_role[co][i] = "Rhino") then l_rhinos += 1;
if (obj_ini.veh_role[co][i] = "Whirlwind") then l_whirls += 1;
if (obj_ini.veh_role[co][i] = "Predator") then l_predators += 1;
if (obj_ini.veh_role[co][i] = "Land Raider") then l_raiders += 1;
}
}
unit = obj_ini.TTRPG[co][i];
if (unit.name() == "") then
continue;
if (obj_ini.loc[co][i] = p_target.name) && (unit.planet_location == planet_number) {
if ((attack = 0) && (string_count("Bike", obj_ini.role[co][i]) = 0)) || (attack = 1) {
if (unit.role() = "Chapter Master") then l_master += 1;
if (unit.role() = obj_ini.role[100][2]) then l_honor += 1;
if (unit.role() = obj_ini.role[100][5]) then l_capts += 1;
if (unit.role() = "Champion") then l_champions += 1;

if (string_count("Bike", obj_ini.role[co][i]) = 0) || (attack = 0) {
if (obj_ini.role[co][i] = obj_ini.role[100][11]) then l_mahreens += 1;
if (unit.IsSpecialist("rank_and_file")) then l_mahreens++
if (obj_ini.role[co][i]=obj_ini.role[100][3]) then l_veterans+=1;
if (obj_ini.role[co][i] = obj_ini.role[100][3]) then l_veterans += 1;
}
if (string_count("Bike",obj_ini.role[co][i])>0) and (attack=1){
if (obj_ini.role[co][i]=obj_ini.role[100][11]) then l_bikes+=1;
if (string_count("Bike", obj_ini.role[co][i]) > 0) && (attack = 1) {
if (obj_ini.role[co][i] = obj_ini.role[100][11]) then l_bikes += 1;
if (unit.IsSpecialist("rank_and_file")) then l_bikes++
if (obj_ini.role[co][i]=obj_ini.role[100][3]) then l_bikes+=1;
if (obj_ini.role[co][i] = obj_ini.role[100][3]) then l_bikes += 1;
}
if (unit.role()=obj_ini.role[100][4]) then l_terminators+=1;
if (unit.role()=obj_ini.role[100][6]) then l_dreads+=1;
if (unit.IsSpecialist("chap", true)) then l_chaplains+=1;
if (unit.IsSpecialist("libs", true)) then l_psykers+=1;
if (unit.IsSpecialist("apoth", true)) then l_apothecaries+=1;
if (unit.IsSpecialist("forge", true)) then l_techmarines+=1;

if (unit.role() = obj_ini.role[100][4]) then l_terminators += 1;
if (unit.role() = obj_ini.role[100][6]) then l_dreads += 1;
if (unit.IsSpecialist("chap", true)) then l_chaplains += 1;
if (unit.IsSpecialist("libs", true)) then l_psykers += 1;
if (unit.IsSpecialist("apoth", true)) then l_apothecaries += 1;
if (unit.IsSpecialist("forge", true)) then l_techmarines += 1;
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion objects/obj_drop_select/Alarm_5.gml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ for (var i=0; i<3600; i++) {
}

var ships_selected=0;
for (var i=0; i<31; i++) {
var ships_len = array_length(ship_all);
for (var i = 0; i < ships_len; i++) {
if (ship_all[i]!=0) then scr_battle_roster(ship[i],ship_ide[i],false);
}
if (ship_all[500]=1) and (attack=1) then scr_battle_roster(p_target.name,obj_controller.selecting_planet,true);
Expand Down
7 changes: 4 additions & 3 deletions objects/obj_drop_select/Alarm_6.gml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ repeat(3600){

// Iterates through all selected "ships" (max 30), including the planet (Local on the drop menu),
// and fills the battle roster with any marines found.
var i;i=-1;ships_selected=0;
repeat(31){
i+=1;if (ship_all[i]!=0) then scr_battle_roster(ship[i],ship_ide[i],false);
ships_selected=0;
var ships_len = array_length(ship_all);
for (var i = 0; i < ships_len; i++) {
if (ship_all[i]!=0) then scr_battle_roster(ship[i],ship_ide[i],false);
}
//ship_all[500] equals "Local" status on the drop menu
if (ship_all[500]=1) and (attack=1) then scr_battle_roster(p_target.name,obj_controller.selecting_planet,true);
Expand Down
7 changes: 4 additions & 3 deletions objects/obj_drop_select/Draw_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,10 @@ if (scr_hit(xx+954,yy+556,xx+1043,yy+579)=true){

// Iterates through all selected "ships" (max 30), including the planet (Local on the drop menu),
// and fills the battle roster with any marines found.
var i;i=-1;ships_selected=0;
repeat(31){
i+=1;if (ship_all[i]!=0) then scr_battle_roster(ship[i],ship_ide[i],false);
ships_selected=0;
var ships_len = array_length(ship_all);
for (var i = 0; i < ships_len; i++) {
if (ship_all[i]!=0) then scr_battle_roster(ship[i],ship_ide[i],false);
}
//ship_all[500] equals "Local" status on the drop menu
if (ship_all[500]=1) and (attack=1) then scr_battle_roster(p_target.name,planet_number,true);
Expand Down
122 changes: 80 additions & 42 deletions objects/obj_drop_select/Mouse_56.gml
Original file line number Diff line number Diff line change
Expand Up @@ -67,55 +67,92 @@ if (obj_controller.cooldown<=0){



if (obj_controller.cooldown<=0){
if (mouse_x>=xx+456) and (mouse_y>=yy+378) and (mouse_x<xx+519) and (mouse_y<yy+403){
instance_destroy();obj_controller.cooldown=8000;
if (obj_controller.cooldown <= 0) {
if (mouse_x >= xx + 456) && (mouse_y >= yy + 378) && (mouse_x < xx + 519) && (mouse_y < yy + 403) {
instance_destroy();
obj_controller.cooldown = 8000;
}

if (mouse_x>=xx+76) and (mouse_y>=yy+82) and (mouse_x<xx+102) and (mouse_y<yy+95){
var onceh;once=0;i=0;
if (all_sel=0) and (onceh=0){
repeat(30){i+=1;
if (ship[i]!="") and (ship_all[i]=0){ship_all[i]=1;scr_drop_fiddle(ship_ide[i],true,i,attack);}

if (mouse_x >= xx + 76) && (mouse_y >= yy + 82) && (mouse_x < xx + 102) && (mouse_y < yy + 95) {
var onceh;
once = 0;
i = 0;
if (all_sel = 0) && (onceh = 0) {
var ships_len = array_length(ship);
for (var i = 0; i < ships_len; i++) {
if (ship[i] != "") && (ship_all[i] = 0) {
ship_all[i] = 1;
scr_drop_fiddle(ship_ide[i], true, i, attack);
}
}
if (ship_all[500] = 0) && (l_size > 0) {
ship_all[500] = 1;
add_ground = 1;
}
if (ship_all[500]=0) and (l_size>0){ship_all[500]=1;add_ground=1;}
onceh=1;all_sel=1;
onceh = 1;
all_sel = 1;
}
if (all_sel=1) and (onceh=0){
repeat(30){i+=1;
if (ship[i]!="") and (ship_all[i]=1){ship_all[i]=0;scr_drop_fiddle(ship_ide[i],false,i,attack);}
if (all_sel = 1) && (onceh = 0) {
var ships_len = array_length(ship);
for (var i = 0; i < ships_len; i++) {
if (ship[i] != "") && (ship_all[i] = 1) {
ship_all[i] = 0;
scr_drop_fiddle(ship_ide[i], false, i, attack);
}
}
if (ship_all[500] = 1) && (l_size > 0) {
ship_all[500] = 0;
add_ground = -1;
}
if (ship_all[500]=1) and (l_size>0){ship_all[500]=0;add_ground=-1;}
onceh=1;all_sel=0;
onceh = 1;
all_sel = 0;
}
}
}

if (add_ground = 1) {
ships_selected += 1;
master += l_master;
honor += l_honor;
capts += l_capts;
mahreens += l_mahreens;
veterans += l_veterans;
terminators += l_terminators;
dreads += l_dreads;
chaplains += l_chaplains;
psykers += l_psykers;
apothecaries += l_apothecaries;
techmarines += l_techmarines;
champions += l_champions;


if (add_ground=1){ships_selected+=1;
master+=l_master;honor+=l_honor;
capts+=l_capts;mahreens+=l_mahreens;
veterans+=l_veterans;terminators+=l_terminators;
dreads+=l_dreads;chaplains+=l_chaplains;
psykers+=l_psykers;apothecaries+=l_apothecaries;
techmarines+=l_techmarines;champions+=l_champions;

bikes+=l_bikes;rhinos+=l_rhinos;
whirls+=l_whirls;predators+=l_predators;
raiders+=l_raiders;speeders+=l_speeders;
bikes += l_bikes;
rhinos += l_rhinos;
whirls += l_whirls;
predators += l_predators;
raiders += l_raiders;
speeders += l_speeders;
}
if (add_ground=-1){ships_selected-=1;
master-=l_master;honor-=l_honor;
capts-=l_capts;mahreens-=l_mahreens;
veterans-=l_veterans;terminators-=l_terminators;
dreads-=l_dreads;chaplains-=l_chaplains;
psykers-=l_psykers;apothecaries-=l_apothecaries;
techmarines-=l_techmarines;champions-=l_champions;

bikes-=l_bikes;rhinos-=l_rhinos;
whirls-=l_whirls;predators-=l_predators;
raiders-=l_raiders;speeders-=l_speeders;
if (add_ground = -1) {
ships_selected -= 1;
master -= l_master;
honor -= l_honor;
capts -= l_capts;
mahreens -= l_mahreens;
veterans -= l_veterans;
terminators -= l_terminators;
dreads -= l_dreads;
chaplains -= l_chaplains;
psykers -= l_psykers;
apothecaries -= l_apothecaries;
techmarines -= l_techmarines;
champions -= l_champions;

bikes -= l_bikes;
rhinos -= l_rhinos;
whirls -= l_whirls;
predators -= l_predators;
raiders -= l_raiders;
speeders -= l_speeders;
}


Expand Down Expand Up @@ -224,9 +261,10 @@ if (obj_controller.cooldown<=0) and (once_only=0){// Need to change max_ships to
}
}

var i;i=-1;ships_selected=0;
repeat(31){
i+=1;if (ship_all[i]!=0) then scr_battle_roster(ship[i],ship_ide[i],false);
ships_selected=0;
var ships_len = array_length(ship_all);
for (var i = 0; i < ships_len; i++) {
if (ship_all[i]!=0) then scr_battle_roster(ship[i],ship_ide[i],false);
}
if (ship_all[500]=1) then scr_battle_roster(p_target.name,planet_number,true);

Expand Down
20 changes: 13 additions & 7 deletions objects/obj_enunit/Alarm_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var leftest,charge=0,enemy2=0,chapter_fuck=1,unit;
// with(obj_pnunit){if (x<-4000) or (defenses=1) then instance_deactivate_object(id);}

if (!flank){
leftest=get_leftmost(obj_enunit);// Left most enunit
leftest=get_leftmost(obj_enunit, false);// Left most enunit
enemy=get_rightmost();// Right most enemy
enemy2=enemy;
if (enemy=="none"||leftest=="none"){
Expand All @@ -23,7 +23,7 @@ if (!flank){


if (leftest.id=self.id) and (!instance_exists(obj_nfort)){
if (position_empty(x-10,y)) and (point_distance(x,y,enemy.x,enemy.y)>10){
if (position_empty(x-10,y)) and (point_distance(x,y,enemy.x,enemy.y)>=10){
with(obj_enunit){
move_unit_block("west");
}
Expand Down Expand Up @@ -318,20 +318,24 @@ if __b__



var leftest,charge,enemy2;charge=0;enemy2=0;
var leftest,charge=0,enemy2=0;

with(obj_pnunit){if (x<-4000) then instance_deactivate_object(id);}
with(obj_pnunit){
if (x<-4000) then instance_deactivate_object(id);
}

if (flank=0){
leftest=get_leftmost(obj_enunit);// Left most enunit
leftest=get_leftmost(obj_enunit, false);// Left most enunit
enemy=instance_nearest(4000,y,obj_pnunit);// Right most enemy
enemy2=enemy;
// if (collision_point(x-10,y,obj_pnunit,0,1)) then engaged=1;
// if (!collision_point(x-10,y,obj_pnunit,0,1)) then engaged=0;
if (leftest.id=self.id) and (!instance_exists(obj_nfort)){
// instance_deactivate_object(obj_cursor);
if (position_empty(x-10,y)){
with(obj_enunit){x-=10;}
with(obj_enunit){
x-=10;
}
}
}
// instance_activate_object(obj_cursor);
Expand All @@ -341,7 +345,9 @@ if (flank=1){
enemy2=enemy;
// if (collision_point(x+10,y,obj_pnunit,0,1)) then engaged=1;
// if (!collision_point(x+10,y,obj_pnunit,0,1)) then engaged=0;
if (position_empty(x+10,y)) then x+=10;
if (position_empty(x+10,y)){
move_unit_block();
}

if (!position_empty(x+10,y)) then engaged=1;// Quick smash
// instance_activate_object(obj_cursor);
Expand Down
Loading