Skip to content

Commit

Permalink
fix(comsumables): divine potions should now be consumed
Browse files Browse the repository at this point in the history
  • Loading branch information
Torwent committed Oct 23, 2023
1 parent 273119e commit 2214046
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
30 changes: 18 additions & 12 deletions osr/items/consumables.simba
Original file line number Diff line number Diff line change
Expand Up @@ -381,22 +381,28 @@ Consumable.SetupBoost
Used internally by consumable handlers/managers to setup the boost consumable records.
*)
procedure TRSConsumable.SetupBoost();
var
str: String;
begin
if Self.IsSetup then
Exit;

case Self.Item of
'Super combat potion(1..4)':
Self.Timer := 6 * ONE_MINUTE;
'Super attack(1..4)':
Self.Timer := 6 * ONE_MINUTE;
'Super strength(1..4)':
Self.Timer := 6 * ONE_MINUTE;
'Bastion potion(1..4)':
Self.Timer := 6 * ONE_MINUTE;
'Ranging potion(1..4)':
Self.Timer := 6 * ONE_MINUTE;
end;
str := ToStr(Self.Item);
if str.Contains('ivine ') then
Self.Timer := (5 * ONE_MINUTE) + (5 * ONE_SECOND)
else
case Self.Item of
'Super combat potion(1..4)':
Self.Timer := 6 * ONE_MINUTE;
'Super attack(1..4)':
Self.Timer := 6 * ONE_MINUTE;
'Super strength(1..4)':
Self.Timer := 6 * ONE_MINUTE;
'Bastion potion(1..4)':
Self.Timer := 6 * ONE_MINUTE;
'Ranging potion(1..4)':
Self.Timer := 6 * ONE_MINUTE;
end;

Self._Setup();
end;
Expand Down
4 changes: 4 additions & 0 deletions utils/utiltypes.simba
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,13 @@ This array holds all types of consumable that boost the player stats.
BOOST_ARRAY: TRSItemArray = [
'Divine super combat potion(1..4)',
'Super combat potion(1..4)',
'Divine super attack potion(1..4)',
'Super attack(1..4)',
'Divine super strength potion(1..4)',
'Super strength(1..4)',
'Divine bastion potion(1..4)',
'Bastion potion(1..4)',
'Divine ranging potion(1..4)',
'Ranging potion(1..4)'
];

Expand Down

0 comments on commit 2214046

Please sign in to comment.