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: 2 additions & 2 deletions scripts_src/arroyo/acfist.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ procedure Node011 begin

skill:=40-has_skill(dude_obj,SKILL_UNARMED_COMBAT);
// Inc Unarmed to 40
critter_mod_skill(dude_obj,SKILL_UNARMED_COMBAT,skill);
call dude_mod_skill(SKILL_UNARMED_COMBAT,skill);
Reply(127);

NOption(128,Node013,004);
Expand All @@ -352,7 +352,7 @@ procedure Node012 begin

skill:=55-has_skill(dude_obj,SKILL_UNARMED_COMBAT);
// Inc Unarmed to 55
critter_mod_skill(dude_obj,SKILL_UNARMED_COMBAT,skill);
call dude_mod_skill(SKILL_UNARMED_COMBAT,skill);
Reply(129);

NOption(130,Node013,004);
Expand Down
2 changes: 1 addition & 1 deletion scripts_src/arroyo/acjordan.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ procedure Node003 begin
gfade_in(600);

game_time_advance(8*ONE_GAME_HOUR);
critter_mod_skill(dude_obj,SKILL_MELEE,10);
call dude_mod_skill(SKILL_MELEE,10);
set_local_var(LVAR_Taught_Player,1);

Reply(107);
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/arroyo/actemvil.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ procedure Node016a begin

game_time_advance(ONE_GAME_HOUR);

critter_mod_skill(dude_obj,SKILL_UNARMED_COMBAT,10);
critter_mod_skill(dude_obj,SKILL_MELEE,10);
call dude_mod_skill(SKILL_UNARMED_COMBAT,10);
call dude_mod_skill(SKILL_MELEE,10);

set_local_var(LVAR_Trained,1);
call Node017;
Expand Down
4 changes: 2 additions & 2 deletions scripts_src/brokhill/hcsulvan.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ end
procedure Node013a begin
// Upgrade fight stats
gfade_out(600);
critter_mod_skill(dude_obj,SKILL_UNARMED_COMBAT,10);
critter_mod_skill(dude_obj,SKILL_MELEE,10);
call dude_mod_skill(SKILL_UNARMED_COMBAT,10);
call dude_mod_skill(SKILL_MELEE,10);
display_msg( mstr(164) );
give_xp( EXP_SULLIVAN_TAUGHT_MOVES );
game_time_advance( 6 * ONE_GAME_HOUR );
Expand Down
12 changes: 12 additions & 0 deletions scripts_src/headers/upu.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ procedure closest_party_member(variable obj) begin
return closest_who;
end

/**
* Modifies a player's `skill` by a given `amount`.
* If the skill is tagged, the magnitude of the adjustment will be at least the specified amount.
*/
procedure dude_mod_skill(variable skill, variable amount) begin
if (is_skill_tagged(skill) and (amount % 2)) then begin
// for rounding half away from zero
if (amount > 0) then amount++;
else amount--;
end
critter_mod_skill(dude_obj, skill, amount);
end


/* Reputation */
Expand Down
2 changes: 1 addition & 1 deletion scripts_src/klamath/kcslim.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ procedure Node990 begin
dude_caps_adjust(-50); // Seraph's Fix: changed from '50' to '-50'
learn:= 2*(dude_iq);
if (learn < 7) then learn:=7;
critter_mod_skill(dude_obj,SKILL_OUTDOORSMAN,learn);
call dude_mod_skill(SKILL_OUTDOORSMAN,learn);
gfade_out(ONE_GAME_MINUTE);
game_time_advance(8*ONE_GAME_HOUR);//8 hours
gfade_in(ONE_GAME_MINUTE);
Expand Down
2 changes: 1 addition & 1 deletion scripts_src/klamath/kcsmiley.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ end

procedure Node940 begin
learn:= random(1,6);
critter_mod_skill(dude_obj,SKILL_OUTDOORSMAN,learn);
call dude_mod_skill(SKILL_OUTDOORSMAN,learn);
gfade_out(600);
game_time_advance(game_ticks(6*3600));//6 hours
gfade_in(600);
Expand Down
2 changes: 1 addition & 1 deletion scripts_src/main/obj_dude.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ procedure use_obj_on_p_proc begin
if (obj_pid(obj_being_used_with) == PID_CATS_PAW_ISSUE_5) then begin
script_overrides;
gfade_out(ONE_GAME_SECOND);
critter_mod_skill(dude_obj, SKILL_ENERGY_WEAPONS, 10);
call dude_mod_skill( SKILL_ENERGY_WEAPONS, 10);
display_msg(message_str(SCRIPT_NICATPW5, 100));
gfade_in(ONE_GAME_SECOND);
script_overrides;
Expand Down
2 changes: 1 addition & 1 deletion scripts_src/newreno/nckitty.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ procedure Node031;

#define speech_bonus_given lvar_bit(LVAR_Flags, speech_bonus_given_bit)
#define set_speech_bonus_given if (speech_bonus_given == false) then begin \
critter_mod_skill(dude_obj, SKILL_SPEECH, 3); \
call dude_mod_skill(SKILL_SPEECH, 3); \
end \
set_lvar_bit_on(LVAR_Flags, speech_bonus_given_bit)

Expand Down
2 changes: 1 addition & 1 deletion scripts_src/newreno/ncliljes.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ variable knife_skill_bonus := 5;
end else begin
display_mstr(2000);
end
critter_mod_skill(dude_obj, SKILL_MELEE, knife_skill_bonus);
call dude_mod_skill(SKILL_MELEE, knife_skill_bonus);
gfade_in(5);
end

Expand Down
2 changes: 1 addition & 1 deletion scripts_src/newreno/ncmason.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ procedure Node052 begin
Reply(725);
set_taught;
game_time_advance(ONE_GAME_HOUR);
critter_mod_skill(dude_obj, SKILL_ENERGY_WEAPONS, 5);
call dude_mod_skill(SKILL_ENERGY_WEAPONS, 5);
gfade_in(5);
BOption(726, Node051, 006);
BOption(643, Node046, 004);
Expand Down
2 changes: 1 addition & 1 deletion scripts_src/newreno/nicatpw5.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ end
procedure use_p_proc begin
script_overrides;
gfade_out(ONE_GAME_SECOND);
critter_mod_skill(dude_obj, SKILL_ENERGY_WEAPONS, 10);
call dude_mod_skill(SKILL_ENERGY_WEAPONS, 10);
display_mstr(100);
gfade_in(ONE_GAME_SECOND);
scr_return(1);
Expand Down
2 changes: 1 addition & 1 deletion scripts_src/newreno/nidermal.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end
procedure use_p_proc begin
display_mstr(100);
give_xp(EXP_NEW_RENO_USE_DERMAL);
critter_mod_skill(dude_obj, SKILL_SPEECH, 10);
call dude_mod_skill(SKILL_SPEECH, 10);
dude_floater(200);
scr_return(1);
end
2 changes: 1 addition & 1 deletion scripts_src/newreno/nif2hint.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ procedure Node001;

#define read_book_bit bit_10

#define max_skill(x) critter_mod_skill(dude_obj, x, (300 - (has_skill(dude_obj, x))))
#define max_skill(x) call dude_mod_skill(x, (300 - (has_skill(dude_obj, x))))

#define read_book lvar_bit(LVAR_Flags, read_book_bit )

Expand Down
2 changes: 1 addition & 1 deletion scripts_src/newreno/nimedica.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ end
procedure use_p_proc begin
display_mstr(100);
give_xp(EXP_NEW_RENO_USE_MEDICAL);
critter_mod_skill(dude_obj, SKILL_DOCTOR, 10);
call dude_mod_skill(SKILL_DOCTOR, 10);
dude_floater(200);
scr_return(1);
end
2 changes: 1 addition & 1 deletion scripts_src/sanfran/fcdragon.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -1172,7 +1172,7 @@ procedure learn2 begin
fadein(1);
float_msg(self_obj, mstr(218), FLOAT_MSG_NORMAL);
display_msg(mstr(219));
critter_mod_skill(dude_obj, SKILL_UNARMED_COMBAT, 5);
call dude_mod_skill(SKILL_UNARMED_COMBAT, 5);
end

procedure ReturnInven begin
Expand Down
2 changes: 1 addition & 1 deletion scripts_src/sanfran/fclopan.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ procedure learn2 begin
fadein(1);
float_msg(self_obj, mstr(218), FLOAT_MSG_NORMAL);
display_msg(mstr(219));
critter_mod_skill(dude_obj, SKILL_UNARMED_COMBAT, 5);
call dude_mod_skill(SKILL_UNARMED_COMBAT, 5);
end

procedure ReturnInven begin
Expand Down
2 changes: 1 addition & 1 deletion scripts_src/sierra/wipnchbg.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ procedure use_p_proc begin
inc_local_var(LVAR_Herebefore);
gfade_out(600);
gfade_in(600);
critter_mod_skill(dude_obj,SKILL_UNARMED_COMBAT,5);
call dude_mod_skill(SKILL_UNARMED_COMBAT,5);
game_time_advance(ONE_GAME_HOUR);
display_msg(g_mstr(950));
end
Expand Down
2 changes: 1 addition & 1 deletion scripts_src/vault13/oscomptr.ssl
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ procedure look_at_p_proc begin
else
display_msg(mstr(101));

/*critter_mod_skill(dude_obj, SKILL_SCIENCE, 100);
/*call dude_mod_skill(SKILL_SCIENCE, 100);
item:=create_object(PID_COMPUTER_VOICE_MODULE,0,0);
add_obj_to_inven(dude_obj, item);*/

Expand Down
Loading