Skip to content

Commit

Permalink
Check Repair skill instead of Speech in robodog repair routine, ref B…
Browse files Browse the repository at this point in the history
  • Loading branch information
burner1024 committed Mar 7, 2024
1 parent 0d396f1 commit 962e7f9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts_src/ncr/scrobo.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,17 @@ procedure Heal_Robo(variable bonus);
#define LVAR_WAITING (9)
#define LVAR_FOLLOW_DISTANCE (10)
#define LVAR_TEAM (11)

/**
* Counter of "healing" (repair) usage.
* Each use increases by 50, every passing hour decreases by 50.
* More advanced Repair skill allows to use Repair more often.
*/
#define LVAR_Heal_Count (12)
/**
* Time counter to keep track when Robodog was last repaired.
* Decreases LVAR_Heal_Count when hit (every hour).
*/
#define LVAR_Heal_Dec_Time (13)

/* Imported variables from the Map scripts. These should only be
Expand Down Expand Up @@ -480,7 +490,7 @@ procedure Node1100 begin // rejoin party
end

procedure Heal_Robo(variable bonus) begin
if (local_var(LVAR_Heal_Count) < has_skill(source_obj, SKILL_SPEECH)) then begin
if (local_var(LVAR_Heal_Count) < has_skill(source_obj, SKILL_REPAIR)) then begin
if (skill_success(source_obj, SKILL_REPAIR, bonus)) then begin
critter_heal(self_obj, Random(10, 40));
set_local_var(LVAR_Heal_Count, local_var(LVAR_Heal_Count) + 50);
Expand Down

0 comments on commit 962e7f9

Please sign in to comment.