mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added "get_inven_ap_cost" script function
Added grey outline to controlled critters at the beginning of the turn.
This commit is contained in:
@@ -36,9 +36,9 @@ procedure combatturn_handler begin
|
||||
variable
|
||||
status := get_sfall_arg,
|
||||
critter := get_sfall_arg,
|
||||
pid, perkID, level, i;
|
||||
pid, perkID, level;
|
||||
|
||||
//display_msg("Combat Turn: " + status + ", by " + obj_name(critter) + ", arg3: " + get_sfall_arg);
|
||||
//display_msg("Combat Turn: " + status + ", by " + obj_name(critter) + "/" + critter + ", arg3: " + get_sfall_arg);
|
||||
if npcControl then begin
|
||||
if lightInt then lightInt := round((lightInt / 65536.0) * 100); // calc percent of intensity
|
||||
obj_set_light_level(npcControl, lightInt, lightDist); // restore light for prev. controlled NPC
|
||||
@@ -55,9 +55,7 @@ procedure combatturn_handler begin
|
||||
foreach (perkID in perksList) begin
|
||||
level := has_trait(TRAIT_PERK, real_dude_obj, perkID);
|
||||
if (level) then begin
|
||||
for (i := 0; i < level; i++) begin
|
||||
critter_add_trait(critter, TRAIT_PERK, perkID, 1);
|
||||
end
|
||||
critter_add_trait(critter, TRAIT_PERK, perkID, level);
|
||||
end
|
||||
end
|
||||
intface_redraw;
|
||||
@@ -70,6 +68,8 @@ procedure combatturn_handler begin
|
||||
npcControl := 0; // dude control
|
||||
end
|
||||
if inControl then begin
|
||||
// check preference setting _combat_highlight
|
||||
if (read_byte(0x56D38C)) then set_outline(critter, OUTLINE_GREY);
|
||||
// center the screen on the controlled critter/dude and remove roof tiles
|
||||
move_to(dude_obj, dude_tile, dude_elevation);
|
||||
if (displayName and critter != real_dude_obj) then begin
|
||||
|
||||
Reference in New Issue
Block a user