Skip to content

Commit

Permalink
fix(FairyRings): FairyRing.HandleItem() now attempts twice before set…
Browse files Browse the repository at this point in the history
…ting the fairy ring staff as "null"
  • Loading branch information
Torwent committed Jan 26, 2024
1 parent 6b5e576 commit 40c1719
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions optional/interfaces/mainscreen/fairyring.simba
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Example
if FairyRing.HandleItem() then
WriteLn FairyRing.Item;
*)
function TRSFairyRing.HandleItem(): Boolean;
function TRSFairyRing.HandleItem(attempts: Int32 = 2): Boolean;
const
ITEMS: TRSItemArray = ['Dramen staff', 'Lunar staff'];
var
Expand Down Expand Up @@ -227,8 +227,10 @@ begin
if currentTab^.ItemInterface.Contains(Self.Item) then
Exit(Self.HandleItem());

Result := attempts = 0;
if not Result then
Exit(Self.HandleItem(Dec(attempts)));
Self.Item := 'null';
Result := True;
end;


Expand Down

0 comments on commit 40c1719

Please sign in to comment.