Skip to content

Commit

Permalink
- Update color for Fortune message
Browse files Browse the repository at this point in the history
- Add logic to check if Fortune is triggered by Balarak's brush, grating 4 of the material gathered.
  • Loading branch information
ZeroGwafa committed Oct 9, 2024
1 parent 1060b6e commit ed76105
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ window.setTimeout(function () {
reader.readargs = {
colors: [
A1lib.mixColor(255, 255, 255), //White text
A1lib.mixColor(0, 255, 0), //Green Fortune Text
A1lib.mixColor(60, 183, 30), //Green Fortune Text
],
backwards: true,
};
Expand Down Expand Up @@ -95,6 +95,16 @@ window.setTimeout(function () {
chatArr[line].indexOf("Fortune perk") > -1 ||
chatArr[line].indexOf("Balarak") > -1
) {
// if Fortune procs, check if it was triggered by a Balarak's Brush proc. Thanks Ex Inferni!
if (
chatArr[line].indexOf("Fortune perk") > -1 &&
chatArr[line - 1] &&
chatArr[line - 1].indexOf("Balarak")
) {
qty = 4;
updateChatHistory(chatArr[line]);
continue;
}
console.log("Fortune, or Balarak triggered, doubling mat.");
updateChatHistory(chatArr[line]);
qty = 2;
Expand Down

0 comments on commit ed76105

Please sign in to comment.