kolmafia / kolmafia

@@ -1498,333 +1498,298 @@
Loading
1498 1498
  // PENDING only when the script could not have known that the attempt
1499 1499
  // would fail.
1500 1500
1501 -
  private static final Object[][] ADVENTURE_FAILURES = {
1501 +
  record AdventureFailure(String responseText, String message, MafiaState severity) {
1502 +
    public AdventureFailure(String responseText, String message) {
1503 +
      this(responseText, message, MafiaState.ERROR);
1504 +
    }
1505 +
  }
1506 +
1507 +
  private static final AdventureFailure[] ADVENTURE_FAILURES = {
1502 1508
    // KoL bug: returning a blank page. This must be index 0.
1503 -
    {
1504 -
      "", "KoL returned a blank page.",
1505 -
    },
1509 +
    new AdventureFailure("", "KoL returned a blank page."),
1506 1510
1507 1511
    // Lots of places.
1508 -
    {
1509 -
      "It is recommended that you have at least",
1510 -
      "Your stats are too low for this location.  Adventure manually to acknowledge or disable this warning.",
1511 -
    },
1512 +
    new AdventureFailure(
1513 +
        "It is recommended that you have at least",
1514 +
        "Your stats are too low for this location.  Adventure manually to acknowledge or disable this warning."),
1512 1515
1513 1516
    // Lots of places.
1514 -
    {
1515 -
      "You shouldn't be here", "You can't get to that area.",
1516 -
    },
1517 +
    new AdventureFailure("You shouldn't be here", "You can't get to that area."),
1517 1518
1518 1519
    // Lots of places.
1519 -
    {
1520 -
      "not yet be accessible", "You can't get to that area.",
1521 -
    },
1520 +
    new AdventureFailure("not yet be accessible", "You can't get to that area."),
1522 1521
1523 1522
    // Lots of places.
1524 -
    {
1525 -
      "You can't get there", "You can't get to that area.",
1526 -
    },
1523 +
    new AdventureFailure("You can't get there", "You can't get to that area."),
1527 1524
1528 1525
    // Lots of places.
1529 -
    {
1530 -
      "Seriously.  It's locked.", "You can't get to that area.",
1531 -
    },
1526 +
    new AdventureFailure("Seriously.  It's locked.", "You can't get to that area."),
1532 1527
1533 1528
    // 8-bit realm and Vanya's Castle
1534 -
    {
1535 -
      "You can't get to the 8-bit realm right now", "You can't get to that area.",
1536 -
    },
1529 +
    new AdventureFailure(
1530 +
        "You can't get to the 8-bit realm right now", "You can't get to that area."),
1537 1531
1538 1532
    // Out of adventures
1539 -
    {"You're out of adventures", "You're out of adventures.", MafiaState.PENDING},
1533 +
    new AdventureFailure(
1534 +
        "You're out of adventures", "You're out of adventures.", MafiaState.PENDING),
1540 1535
1541 1536
    // Out of adventures in the Daily Dungeon
1542 -
    {"You don't have any adventures.", "You're out of adventures.", MafiaState.PENDING},
1537 +
    new AdventureFailure(
1538 +
        "You don't have any adventures.", "You're out of adventures.", MafiaState.PENDING),
1543 1539
1544 1540
    // Out of adventures at Shore
1545 -
    {"You don't have enough Adventures left", "You're out of adventures.", MafiaState.PENDING},
1541 +
    new AdventureFailure(
1542 +
        "You don't have enough Adventures left", "You're out of adventures.", MafiaState.PENDING),
1546 1543
1547 1544
    // Out of meat at Shore
1548 -
    {
1549 -
      "You can't afford to go on a vacation", "You can't afford to go on a vacation.",
1550 -
    },
1545 +
    new AdventureFailure(
1546 +
        "You can't afford to go on a vacation", "You can't afford to go on a vacation."),
1551 1547
1552 1548
    // Too drunk at shore
1553 -
    {
1554 -
      "You're too drunk to go on vacation", "You are too drunk to go on a vacation.",
1555 -
    },
1549 +
    new AdventureFailure(
1550 +
        "You're too drunk to go on vacation", "You are too drunk to go on a vacation."),
1556 1551
1557 1552
    // Beaten up at zero HP
1558 -
    {
1559 -
      "You're way too beaten up to go on an adventure right now",
1560 -
      "You can't adventure at 0 HP.",
1561 -
      MafiaState.PENDING
1562 -
    },
1553 +
    new AdventureFailure(
1554 +
        "You're way too beaten up to go on an adventure right now",
1555 +
        "You can't adventure at 0 HP.",
1556 +
        MafiaState.PENDING),
1563 1557
1564 1558
    // Typical Tavern with less than 100 Meat
1565 -
    {
1566 -
      "Why go to the Tavern if you can't afford to drink?", "You can't afford to go out drinking.",
1567 -
    },
1559 +
    new AdventureFailure(
1560 +
        "Why go to the Tavern if you can't afford to drink?",
1561 +
        "You can't afford to go out drinking."),
1568 1562
1569 1563
    // The Road to White Citadel
1570 -
    {
1571 -
      "You've already found the White Citadel", "The Road to the White Citadel is already cleared.",
1572 -
    },
1564 +
    new AdventureFailure(
1565 +
        "You've already found the White Citadel",
1566 +
        "The Road to the White Citadel is already cleared."),
1573 1567
1574 1568
    // Friar's Ceremony Location without the three items
1575 -
    {
1576 -
      "You don't appear to have all of the elements necessary to perform the ritual",
1577 -
      "You don't have everything you need.",
1578 -
    },
1569 +
    new AdventureFailure(
1570 +
        "You don't appear to have all of the elements necessary to perform the ritual",
1571 +
        "You don't have everything you need."),
1579 1572
1580 1573
    // You need some sort of stench protection to adventure in there.
1581 1574
    // You're going to need some sort of stench protection if you want to adventure here.
1582 -
    {
1583 -
      "need some sort of stench protection", "You need stench protection.",
1584 -
    },
1575 +
    new AdventureFailure("need some sort of stench protection", "You need stench protection."),
1585 1576
1586 1577
    // You need some sort of protection from the cold if you're
1587 1578
    // going to visit the Icy Peak.
1588 -
    {
1589 -
      "You need some sort of protection from the cold", "You need cold protection.",
1590 -
    },
1579 +
    new AdventureFailure(
1580 +
        "You need some sort of protection from the cold", "You need cold protection."),
1591 1581
1592 1582
    // You try to enter the Haunted Library, but the door is locked. I guess this particular
1593 1583
    // information doesn't want to be free.
1594 -
    {
1595 -
      "I guess this particular information doesn't want to be free",
1596 -
      "You need the Spookyraven library key.",
1597 -
    },
1584 +
    new AdventureFailure(
1585 +
        "I guess this particular information doesn't want to be free",
1586 +
        "You need the Spookyraven library key."),
1598 1587
1599 1588
    // Mining while drunk
1600 -
    {
1601 -
      "You're too drunk to spelunk, as it were", "You are too drunk to go there.",
1602 -
    },
1589 +
    new AdventureFailure(
1590 +
        "You're too drunk to spelunk, as it were", "You are too drunk to go there."),
1603 1591
1604 1592
    // Pyramid Lower Chamber while drunk
1605 -
    {
1606 -
      "You're too drunk to screw around", "You are too drunk to go there.",
1607 -
    },
1593 +
    new AdventureFailure("You're too drunk to screw around", "You are too drunk to go there."),
1608 1594
1609 1595
    // You can't adventure there without some way of breathing underwater...
1610 -
    {
1611 -
      "without some way of breathing underwater", "You can't breathe underwater.",
1612 -
    },
1596 +
    new AdventureFailure(
1597 +
        "without some way of breathing underwater", "You can't breathe underwater."),
1613 1598
1614 1599
    // You can't adventure there now -- Gort wouldn't be able to breathe!
1615 -
    {
1616 -
      "wouldn't be able to breathe", "Your familiar can't breathe underwater.",
1617 -
    },
1600 +
    new AdventureFailure("wouldn't be able to breathe", "Your familiar can't breathe underwater."),
1618 1601
1619 1602
    // It wouldn't be safe to go in there dressed like you are. You should consider a Mer-kin
1620 1603
    // disguise.
1621 -
    {
1622 -
      "You should consider a Mer-kin disguise.", "You aren't wearing a Mer-kin disguise.",
1623 -
    },
1604 +
    new AdventureFailure(
1605 +
        "You should consider a Mer-kin disguise.", "You aren't wearing a Mer-kin disguise."),
1624 1606
1625 1607
    // Attempting to enter the Cola Wars Battlefield with level > 5
1626 -
    {
1627 -
      "The temporal rift in the plains has closed",
1628 -
      "The temporal rift has closed.",
1629 -
      MafiaState.PENDING
1630 -
    },
1608 +
    new AdventureFailure(
1609 +
        "The temporal rift in the plains has closed",
1610 +
        "The temporal rift has closed.",
1611 +
        MafiaState.PENDING),
1631 1612
1632 1613
    // Out of your mining uniform, you are quickly identified as a
1633 1614
    // stranger and shown the door.
1634 -
    {
1635 -
      "you are quickly identified as a stranger", "You aren't wearing an appropriate uniform.",
1636 -
    },
1615 +
    new AdventureFailure(
1616 +
        "you are quickly identified as a stranger", "You aren't wearing an appropriate uniform."),
1637 1617
1638 1618
    // You're not properly equipped for that. Get into a uniform.
1639 -
    {
1640 -
      "Get into a uniform", "You aren't wearing an appropriate uniform.",
1641 -
    },
1619 +
    new AdventureFailure("Get into a uniform", "You aren't wearing an appropriate uniform."),
1642 1620
1643 1621
    // There are no Frat soldiers left
1644 -
    {
1645 -
      "There are no Frat soldiers left", "There are no Frat soldiers left.",
1646 -
    },
1622 +
    new AdventureFailure("There are no Frat soldiers left", "There are no Frat soldiers left."),
1647 1623
1648 1624
    // There are no Hippy soldiers left
1649 -
    {
1650 -
      "There are no Hippy soldiers left", "There are no Hippy soldiers left.",
1651 -
    },
1625 +
    new AdventureFailure("There are no Hippy soldiers left", "There are no Hippy soldiers left."),
1652 1626
1653 1627
    // Spooky Gravy Burrow before told to go there:
1654 1628
    // You should probably stay out of there unless you have a good
1655 1629
    // reason to go in. Like if you were on a quest to find
1656 1630
    // something in there, or something.
1657 -
    {
1658 -
      "You should probably stay out of there",
1659 -
      "You have not been given the quest to go there yet.",
1660 -
      MafiaState.PENDING
1661 -
    },
1631 +
    new AdventureFailure(
1632 +
        "You should probably stay out of there",
1633 +
        "You have not been given the quest to go there yet.",
1634 +
        MafiaState.PENDING),
1662 1635
1663 1636
    // Worm Wood while not Absinthe Minded
1664 -
    {
1665 -
      "For some reason, you can't find your way back there",
1666 -
      "You need to be Absinthe Minded to go there.",
1667 -
      MafiaState.PENDING
1668 -
    },
1637 +
    new AdventureFailure(
1638 +
        "For some reason, you can't find your way back there",
1639 +
        "You need to be Absinthe Minded to go there.",
1640 +
        MafiaState.PENDING),
1669 1641
1670 1642
    // "You can't take it any more. The confusion, the nostalgia,
1671 1643
    // the inconsistent grammar. You break the bottle on the
1672 1644
    // ground, and stomp it to powder."
1673 -
    {
1674 -
      "You break the bottle on the ground",
1675 -
      "You are no longer gazing into the bottle.",
1676 -
      MafiaState.PENDING
1677 -
    },
1645 +
    new AdventureFailure(
1646 +
        "You break the bottle on the ground",
1647 +
        "You are no longer gazing into the bottle.",
1648 +
        MafiaState.PENDING),
1678 1649
1679 1650
    // You're in the regular dimension now, and don't remember how
1680 1651
    // to get back there.
1681 -
    {"You're in the regular dimension now", "You are no longer Half-Astral.", MafiaState.PENDING},
1652 +
    new AdventureFailure(
1653 +
        "You're in the regular dimension now",
1654 +
        "You are no longer Half-Astral.",
1655 +
        MafiaState.PENDING),
1682 1656
1683 1657
    // The Factory has faded back into the spectral mists, and
1684 1658
    // eldritch vapors and such.
1685 -
    {"faded back into the spectral mists", "No one may know of its coming or going."},
1659 +
    new AdventureFailure(
1660 +
        "faded back into the spectral mists", "No one may know of its coming or going."),
1686 1661
1687 1662
    // You wander around the farm for a while, but can't find any
1688 1663
    // additional ducks to fight. Maybe some more will come out of
1689 1664
    // hiding by tomorrow.
1690 -
    {"can't find any additional ducks", "Nothing more to do here today.", MafiaState.PENDING},
1665 +
    new AdventureFailure(
1666 +
        "can't find any additional ducks", "Nothing more to do here today.", MafiaState.PENDING),
1691 1667
1692 1668
    // There are no more ducks here.
1693 -
    {"no more ducks here", "Farm area cleared.", MafiaState.PENDING},
1669 +
    new AdventureFailure("no more ducks here", "Farm area cleared.", MafiaState.PENDING),
1694 1670
1695 1671
    // You don't know where that place is.
1696 -
    {
1697 -
      "You don't know where that place is.",
1698 -
      "Use a \"DRINK ME\" potion before trying to adventure here.",
1699 -
      MafiaState.PENDING
1700 -
    },
1672 +
    new AdventureFailure(
1673 +
        "You don't know where that place is.",
1674 +
        "Use a \"DRINK ME\" potion before trying to adventure here.",
1675 +
        MafiaState.PENDING),
1701 1676
1702 1677
    // Orchard failure - You try to enter the feeding chamber, but
1703 1678
    // your way is blocked by a wriggling mass of filthworm drones.
1704 1679
    // Looks like they don't let anything in here if they don't
1705 1680
    // recognize its smell.
1706 -
    {
1707 -
      "Looks like they don't let anything in here if they don't recognize its smell.",
1708 -
      "Use a filthworm hatchling scent gland before trying to adventure here.",
1709 -
    },
1681 +
    new AdventureFailure(
1682 +
        "Looks like they don't let anything in here if they don't recognize its smell.",
1683 +
        "Use a filthworm hatchling scent gland before trying to adventure here."),
1710 1684
1711 1685
    // Orchard failure - You try to enter the royal guards'
1712 1686
    // chamber, but you're immediately shoved back out into the
1713 1687
    // tunnel. Looks like the guards will only let you in here if
1714 1688
    // you smell like food.
1715 -
    {
1716 -
      "Looks like the guards will only let you in here if you smell like food.",
1717 -
      "Use a filthworm drone scent gland before trying to adventure here.",
1718 -
    },
1689 +
    new AdventureFailure(
1690 +
        "Looks like the guards will only let you in here if you smell like food.",
1691 +
        "Use a filthworm drone scent gland before trying to adventure here."),
1719 1692
1720 1693
    // Orchard failure - You try to enter the filthworm queen's
1721 1694
    // chamber, but the guards outside the door block the entrance.
1722 1695
    // You must not smell right to 'em.
1723 -
    {
1724 -
      "You must not smell right to 'em.",
1725 -
      "Use a filthworm royal guard scent gland before trying to adventure here.",
1726 -
    },
1696 +
    new AdventureFailure(
1697 +
        "You must not smell right to 'em.",
1698 +
        "Use a filthworm royal guard scent gland before trying to adventure here."),
1727 1699
1728 1700
    // Orchard failure - The filthworm queen has been slain, and the
1729 1701
    // hive lies empty 'neath the orchard.
1730 -
    {
1731 -
      "The filthworm queen has been slain", "The filthworm queen has been slain.",
1732 -
    },
1702 +
    new AdventureFailure(
1703 +
        "The filthworm queen has been slain", "The filthworm queen has been slain."),
1733 1704
1734 1705
    // You've already retrieved all of the stolen Meat
1735 -
    {
1736 -
      "already retrieved all of the stolen Meat",
1737 -
      "You already recovered the Nuns' Meat.",
1738 -
      MafiaState.PENDING
1739 -
    },
1706 +
    new AdventureFailure(
1707 +
        "already retrieved all of the stolen Meat",
1708 +
        "You already recovered the Nuns' Meat.",
1709 +
        MafiaState.PENDING),
1740 1710
1741 1711
    // There are no hippy soldiers left -- the way to their camp is clear!
1742 -
    {"the way to their camp is clear", "There are no hippy soldiers left.", MafiaState.PENDING},
1712 +
    new AdventureFailure(
1713 +
        "the way to their camp is clear", "There are no hippy soldiers left.", MafiaState.PENDING),
1743 1714
1744 1715
    // Cobb's Knob King's Chamber after defeating the goblin king.
1745 -
    {
1746 -
      "You've already slain the Goblin King",
1747 -
      "You already defeated the Goblin King.",
1748 -
      MafiaState.PENDING
1749 -
    },
1716 +
    new AdventureFailure(
1717 +
        "You've already slain the Goblin King",
1718 +
        "You already defeated the Goblin King.",
1719 +
        MafiaState.PENDING),
1750 1720
1751 1721
    // The Haert of the Cyrpt after defeating the Bonerdagon
1752 -
    {"Bonerdagon has been defeated", "You already defeated the Bonerdagon.", MafiaState.PENDING},
1722 +
    new AdventureFailure(
1723 +
        "Bonerdagon has been defeated", "You already defeated the Bonerdagon.", MafiaState.PENDING),
1753 1724
1754 1725
    // Any cyrpt area after defeating the sub-boss
1755 -
    {"already undefiled", "Cyrpt area cleared.", MafiaState.PENDING},
1726 +
    new AdventureFailure("already undefiled", "Cyrpt area cleared.", MafiaState.PENDING),
1756 1727
1757 1728
    // The Summoning Chamber after Lord Spookyraven has been defeated
1758 1729
    //
1759 1730
    // You enter the Summoning Chamber.  The air is heavy with
1760 1731
    // evil, and otherworldly whispers echo melodramatically
1761 1732
    // through your mind
1762 -
    {"otherworldly whispers", "You already defeated Lord Spookyraven.", MafiaState.PENDING},
1733 +
    new AdventureFailure(
1734 +
        "otherworldly whispers", "You already defeated Lord Spookyraven.", MafiaState.PENDING),
1763 1735
1764 1736
    // Ed the undying defeated
1765 -
    {
1766 -
      "Ed the Undying sleeps once again",
1767 -
      "Ed the Undying has already been defeated.",
1768 -
      MafiaState.PENDING
1769 -
    },
1737 +
    new AdventureFailure(
1738 +
        "Ed the Undying sleeps once again",
1739 +
        "Ed the Undying has already been defeated.",
1740 +
        MafiaState.PENDING),
1770 1741
1771 1742
    // You probably shouldn't -- you don't trust those rats not to steal your token!
1772 -
    {
1773 -
      "don't trust those rats not to steal",
1774 -
      "You don't trust those rats not to steal your token!.",
1775 -
      MafiaState.PENDING
1776 -
    },
1743 +
    new AdventureFailure(
1744 +
        "don't trust those rats not to steal",
1745 +
        "You don't trust those rats not to steal your token!.",
1746 +
        MafiaState.PENDING),
1777 1747
1778 1748
    // That's too far to walk, and
1779 1749
    // <a href=clan_dreadsylvania.php?place=carriage>the Carriageman</a>
1780 1750
    // isn't drunk enough to take you there.
1781 -
    {
1782 -
      "That's too far to walk",
1783 -
      "The Carriageman isn't drunk enough to take you there.",
1784 -
      MafiaState.PENDING
1785 -
    },
1751 +
    new AdventureFailure(
1752 +
        "That's too far to walk",
1753 +
        "The Carriageman isn't drunk enough to take you there.",
1754 +
        MafiaState.PENDING),
1786 1755
1787 1756
    // The forest is silent, those who stalked it having themselves been stalked.
1788 -
    {
1789 -
      "The forest is silent", "The Dreadsylvanian Woods boss has been defeated.", MafiaState.PENDING
1790 -
    },
1757 +
    new AdventureFailure(
1758 +
        "The forest is silent",
1759 +
        "The Dreadsylvanian Woods boss has been defeated.",
1760 +
        MafiaState.PENDING),
1791 1761
1792 1762
    // The village is now a ghost town in the figurative sense, rather than the literal.
1793 -
    {
1794 -
      "The village is now a ghost town",
1795 -
      "The Dreadsylvanian Village boss has been defeated.",
1796 -
      MafiaState.PENDING
1797 -
    },
1763 +
    new AdventureFailure(
1764 +
        "The village is now a ghost town",
1765 +
        "The Dreadsylvanian Village boss has been defeated.",
1766 +
        MafiaState.PENDING),
1798 1767
1799 1768
    // Look upon this castle, ye mighty, and despair, because the king is dead, baby.
1800 -
    {
1801 -
      "the king is dead, baby",
1802 -
      "The Dreadsylvanian Castle boss has been defeated.",
1803 -
      MafiaState.PENDING
1804 -
    },
1769 +
    new AdventureFailure(
1770 +
        "the king is dead, baby",
1771 +
        "The Dreadsylvanian Castle boss has been defeated.",
1772 +
        MafiaState.PENDING),
1805 1773
1806 1774
    // This part of the city is awfully unremarkable, now that
1807 1775
    // you've cleared that ancient protector spirit out.
1808 -
    {
1809 -
      "cleared that ancient protector spirit out",
1810 -
      "You already defeated the protector spirit in that square.",
1811 -
    },
1776 +
    new AdventureFailure(
1777 +
        "cleared that ancient protector spirit out",
1778 +
        "You already defeated the protector spirit in that square."),
1812 1779
1813 1780
    // Now that you've put something in the round depression in the
1814 1781
    // altar, the altar doesn't really do anything but look
1815 1782
    // neat. Those ancient guys really knew how to carve themselves
1816 1783
    // an altar, mmhmm.
1817 -
    {
1818 -
      "the altar doesn't really do anything but look neat",
1819 -
      "You already used the altar in that square.",
1820 -
    },
1784 +
    new AdventureFailure(
1785 +
        "the altar doesn't really do anything but look neat",
1786 +
        "You already used the altar in that square."),
1821 1787
1822 1788
    // Here's poor Dr. Henry "Dakota" Fanning, Ph.D, R.I.P., lying
1823 1789
    // here in a pile just where you left him.
1824 -
    {
1825 -
      "lying here in a pile just where you left him",
1826 -
      "You already looted Dr. Fanning in that square.",
1827 -
    },
1790 +
    new AdventureFailure(
1791 +
        "lying here in a pile just where you left him",
1792 +
        "You already looted Dr. Fanning in that square."),
1828 1793
1829 1794
    // You wander into the empty temple and look around. Remember
1830 1795
    // when you were in here before, and tried to gank some old
@@ -1833,114 +1798,103 @@
Loading
1833 1798
    // doohickey?
1834 1799
    //
1835 1800
    // Good times, man. Good times.
1836 -
    {
1837 -
      "You wander into the empty temple", "You already looted the temple in that square.",
1838 -
    },
1801 +
    new AdventureFailure(
1802 +
        "You wander into the empty temple", "You already looted the temple in that square."),
1839 1803
1840 1804
    // You climb the stairs from the castle's basement, but the
1841 1805
    // door at the top is closed and you can't find the doorknob.
1842 1806
    //
1843 1807
    // You'll have to find another way up.
1844 -
    {
1845 -
      "You'll have to find another way up",
1846 -
      "You haven't opened the ground floor of the castle yet.",
1847 -
    },
1808 +
    new AdventureFailure(
1809 +
        "You'll have to find another way up",
1810 +
        "You haven't opened the ground floor of the castle yet."),
1848 1811
1849 1812
    // You have to learn to walk before you can learn to fly.
1850 1813
    //
1851 1814
    // Also you can't get to the top floor of a building if you can't get to the ground floor.
1852 -
    {
1853 -
      "you can't get to the ground floor", "You haven't opened the ground floor of the castle yet.",
1854 -
    },
1815 +
    new AdventureFailure(
1816 +
        "you can't get to the ground floor",
1817 +
        "You haven't opened the ground floor of the castle yet."),
1855 1818
1856 1819
    // The door at the top of the ground floor stairway is also
1857 1820
    // closed, and you're still too short to reach a doorknob
1858 1821
    // that's forty feet over your head.
1859 1822
    //
1860 1823
    // You'll have to figure out some other way to get upstairs.
1861 -
    {
1862 -
      "You'll have to figure out some other way to get upstairs",
1863 -
      "You haven't opened the top floor of the castle yet.",
1864 -
    },
1824 +
    new AdventureFailure(
1825 +
        "You'll have to figure out some other way to get upstairs",
1826 +
        "You haven't opened the top floor of the castle yet."),
1865 1827
1866 1828
    // The portal is open! Head home and prepare to save some children!
1867 -
    {
1868 -
      "prepare to save some children", "The portal is open.",
1869 -
    },
1829 +
    new AdventureFailure("prepare to save some children", "The portal is open."),
1870 1830
1871 1831
    // It looks like things are running pretty smoothly at the
1872 1832
    // factory right now -- there's nobody to fight.
1873 -
    {
1874 -
      "things are running pretty smoothly", "Nothing more to do here today.",
1875 -
    },
1833 +
    new AdventureFailure("things are running pretty smoothly", "Nothing more to do here today."),
1876 1834
1877 1835
    // You should talk to Edwing before you head back in there, and
1878 1836
    // wait for him to formulate a plan.
1879 -
    {
1880 -
      "You should talk to Edwing", "Nothing more to do here today.",
1881 -
    },
1837 +
    new AdventureFailure("You should talk to Edwing", "Nothing more to do here today."),
1882 1838
1883 1839
    // The compound is abandoned now...
1884 -
    {
1885 -
      "The compound is abandoned now", "Nothing more to do here today.",
1886 -
    },
1840 +
    new AdventureFailure("The compound is abandoned now", "Nothing more to do here today."),
1887 1841
1888 1842
    // Between the wind and the weird spiky bits all over it, you
1889 1843
    // can't make it to the second story of the fortress without
1890 1844
    // some way of escaping gravity.
1891 -
    {
1892 -
      "some way of escaping gravity", "You are not wearing a warbear hoverbelt.",
1893 -
    },
1845 +
    new AdventureFailure(
1846 +
        "some way of escaping gravity", "You are not wearing a warbear hoverbelt."),
1894 1847
1895 1848
    // Your hoverbelt would totally do the trick to get you up
1896 1849
    // there, only it's out of juice.
1897 -
    {
1898 -
      "it's out of juice", "Your hoverbelt needs a new battery.",
1899 -
    },
1850 +
    new AdventureFailure("it's out of juice", "Your hoverbelt needs a new battery."),
1900 1851
1901 1852
    // You float up to the third story of the fortress, but all you
1902 1853
    // find is a locked door with a keypad next to it, and you
1903 1854
    // don't have a code.
1904 -
    {
1905 -
      "you don't have a code", "You don't have a warbear badge.",
1906 -
    },
1855 +
    new AdventureFailure("you don't have a code", "You don't have a warbear badge."),
1907 1856
1908 1857
    // There's nothing left of Ol' Scratch but a crater and a
1909 1858
    // stove.  Burnbarrel Blvd. is still hot, but it's no longer
1910 1859
    // bothered.  Or worth bothering with.
1911 -
    {"There's nothing left of Ol' Scratch", "Nothing more to do here.", MafiaState.PENDING},
1860 +
    new AdventureFailure(
1861 +
        "There's nothing left of Ol' Scratch", "Nothing more to do here.", MafiaState.PENDING),
1912 1862
1913 1863
    // There's nothing left in Exposure Esplanade. All of the snow
1914 1864
    // forts have been crushed or melted, all of the igloos are
1915 1865
    // vacant, and all of the reindeer are off playing games
1916 1866
    // somewhere else.
1917 -
    {"There's nothing left in Exposure Esplanade", "Nothing more to do here.", MafiaState.PENDING},
1867 +
    new AdventureFailure(
1868 +
        "There's nothing left in Exposure Esplanade",
1869 +
        "Nothing more to do here.",
1870 +
        MafiaState.PENDING),
1918 1871
1919 1872
    // The Heap is empty.  Well, let me rephrase that.  It's still
1920 1873
    // full of garbage, but there's nobody and nothing of interest
1921 1874
    // mixed in with the garbage.
1922 -
    {"The Heap is empty", "Nothing more to do here.", MafiaState.PENDING},
1875 +
    new AdventureFailure("The Heap is empty", "Nothing more to do here.", MafiaState.PENDING),
1923 1876
1924 1877
    // There's nothing going on here anymore -- the tombs of the
1925 1878
    // Ancient Hobo Burial Ground are all as silent as themselves.
1926 -
    {"There's nothing going on here anymore", "Nothing more to do here.", MafiaState.PENDING},
1879 +
    new AdventureFailure(
1880 +
        "There's nothing going on here anymore", "Nothing more to do here.", MafiaState.PENDING),
1927 1881
1928 1882
    // There's nothing left in the Purple Light District.  All of
1929 1883
    // the pawn shops and adult bookshops have closed their doors
1930 1884
    // for good.
1931 -
    {
1932 -
      "There's nothing left in the Purple Light District",
1933 -
      "Nothing more to do here.",
1934 -
      MafiaState.PENDING
1935 -
    },
1885 +
    new AdventureFailure(
1886 +
        "There's nothing left in the Purple Light District",
1887 +
        "Nothing more to do here.",
1888 +
        MafiaState.PENDING),
1936 1889
1937 1890
    // The Hoboverlord has been defeated, and Hobopolis Town Square
1938 1891
    // lies empty.
1939 -
    {"Hobopolis Town Square lies empty", "Nothing more to do here.", MafiaState.PENDING},
1892 +
    new AdventureFailure(
1893 +
        "Hobopolis Town Square lies empty", "Nothing more to do here.", MafiaState.PENDING),
1940 1894
1941 1895
    // The bathrooms are empty now -- looks like you've taken care
1942 1896
    // of the elf hobo problem for the time being.
1943 -
    {"bathrooms are empty now", "Nothing more to do here.", MafiaState.PENDING},
1897 +
    new AdventureFailure("bathrooms are empty now", "Nothing more to do here.", MafiaState.PENDING),
1944 1898
1945 1899
    // The Skies over Valhalls
1946 1900
@@ -1948,11 +1902,10 @@
Loading
1948 1902
    // looking at Valhalla from a dizzying height. Come down now,
1949 1903
    // they'll say, but there's no way you're going all the way
1950 1904
    // through that slash without some sort of transportation.
1951 -
    {
1952 -
      "there's no way you're going all the way through that slash",
1953 -
      "You don't have a flying mount.",
1954 -
      MafiaState.PENDING
1955 -
    },
1905 +
    new AdventureFailure(
1906 +
        "there's no way you're going all the way through that slash",
1907 +
        "You don't have a flying mount.",
1908 +
        MafiaState.PENDING),
1956 1909
1957 1910
    // You can't do anything without some way of flying.  And
1958 1911
    // before you go pointing at all of the stuff in your inventory
@@ -1960,55 +1913,48 @@
Loading
1960 1913
    // that stuff won't work.  You're gonna need a hideous winged
1961 1914
    // yeti mount, because that's the only thing that can handle
1962 1915
    // this particular kind of flying.  Because of science.
1963 -
    {
1964 -
      "You can't do anything without some way of flying",
1965 -
      "You don't have a flying mount.",
1966 -
      MafiaState.PENDING
1967 -
    },
1916 +
    new AdventureFailure(
1917 +
        "You can't do anything without some way of flying",
1918 +
        "You don't have a flying mount.",
1919 +
        MafiaState.PENDING),
1968 1920
1969 1921
    // There are at least two of everything up there, and you're
1970 1922
    // also worried that you might fall off your yeti. You should
1971 1923
    // maybe come back when you're at least slightly less drunk.
1972 -
    {
1973 -
      "You should  maybe come back when you're at least slightly less drunk",
1974 -
      "You are too drunk.",
1975 -
      MafiaState.PENDING
1976 -
    },
1924 +
    new AdventureFailure(
1925 +
        "You should  maybe come back when you're at least slightly less drunk",
1926 +
        "You are too drunk.",
1927 +
        MafiaState.PENDING),
1977 1928
1978 1929
    // You don't have the energy to attack a problem this size. Go
1979 1930
    // drink some soda or something.
1980 -
    {
1981 -
      "You don't have the energy to attack a problem this size",
1982 -
      "You need at least 20% buffed max MP.",
1983 -
      MafiaState.PENDING
1984 -
    },
1931 +
    new AdventureFailure(
1932 +
        "You don't have the energy to attack a problem this size",
1933 +
        "You need at least 20% buffed max MP.",
1934 +
        MafiaState.PENDING),
1985 1935
1986 1936
    // You're not in good enough shape to deal with a threat this
1987 1937
    // large. Go get some rest, or put on some band-aids or
1988 1938
    // something.
1989 -
    {
1990 -
      "You're not in good enough shape to deal with a threat this large",
1991 -
      "You need at least 20% buffed max HP.",
1992 -
      MafiaState.PENDING
1993 -
    },
1939 +
    new AdventureFailure(
1940 +
        "You're not in good enough shape to deal with a threat this large",
1941 +
        "You need at least 20% buffed max HP.",
1942 +
        MafiaState.PENDING),
1994 1943
1995 1944
    // Your El Vibrato portal has run out of power. You should go
1996 1945
    // back to your campsite and charge it back up.
1997 -
    {
1998 -
      "Your El Vibrato portal has run out of power",
1999 -
      "Your El Vibrato portal has run out of power",
2000 -
      MafiaState.PENDING
2001 -
    },
1946 +
    new AdventureFailure(
1947 +
        "Your El Vibrato portal has run out of power",
1948 +
        "Your El Vibrato portal has run out of power",
1949 +
        MafiaState.PENDING),
2002 1950
2003 1951
    // No longer Transpondent
2004 -
    {
2005 -
      "you don't know the transporter frequency", "You are no longer Transpondent.",
2006 -
    },
1952 +
    new AdventureFailure(
1953 +
        "you don't know the transporter frequency", "You are no longer Transpondent."),
2007 1954
2008 1955
    // No longer Transpondent
2009 -
    {
2010 -
      "without the proper transporter frequency", "You are no longer Transpondent.",
2011 -
    },
1956 +
    new AdventureFailure(
1957 +
        "without the proper transporter frequency", "You are no longer Transpondent."),
2012 1958
2013 1959
    // No longer Dis Abled
2014 1960
    //
@@ -2016,174 +1962,128 @@
Loading
2016 1962
    // No, you don't! You don't have it all still in your head!
2017 1963
    // Better find a new one you can read! I swear this:
2018 1964
    // 'Til you do, you can't visit the Suburbs of Dis!
2019 -
    {
2020 -
      "you can't visit the Suburbs of Dis", "You are no longer Dis Abled.",
2021 -
    },
1965 +
    new AdventureFailure("you can't visit the Suburbs of Dis", "You are no longer Dis Abled."),
2022 1966
2023 1967
    // Abyssal Portals
2024 1968
    //
2025 1969
    // The area around the portal is quiet. Looks like you took
2026 1970
    // care of all of the seals. Maybe check back tomorrow.
2027 -
    {
2028 -
      "area around the portal is quiet", "The Abyssal Portal is quiet.",
2029 -
    },
1971 +
    new AdventureFailure("area around the portal is quiet", "The Abyssal Portal is quiet."),
2030 1972
2031 1973
    // The Secret Government Laboratory
2032 1974
    //
2033 1975
    // You can't go in there without wearing a Personal Ventilation
2034 1976
    // Unit. Who knows what would happen if you breathed the air in
2035 1977
    // there.
2036 -
    {
2037 -
      "Who knows what would happen if you breathed the air",
2038 -
      "You need to equip your Personal Ventilation Unit.",
2039 -
    },
1978 +
    new AdventureFailure(
1979 +
        "Who knows what would happen if you breathed the air",
1980 +
        "You need to equip your Personal Ventilation Unit."),
2040 1981
2041 1982
    // GameInformPowerPro video game levels
2042 1983
    //
2043 1984
    // You already cleared out this area.
2044 -
    {
2045 -
      "You already cleared out this area", "You already cleared out this area",
2046 -
    },
1985 +
    new AdventureFailure("You already cleared out this area", "You already cleared out this area"),
2047 1986
2048 1987
    // This area is closed.
2049 -
    {
2050 -
      "This area is closed", "You completed the video game",
2051 -
    },
1988 +
    new AdventureFailure("This area is closed", "You completed the video game"),
2052 1989
2053 1990
    // You wander around, off the Florida Keys, but can't find anything
2054 -
    {
2055 -
      "off the Florida Keys", "You need a Tropical Contact High to go there.",
2056 -
    },
1991 +
    new AdventureFailure("off the Florida Keys", "You need a Tropical Contact High to go there."),
2057 1992
2058 1993
    // You approach the adorable little door, but you can't figure
2059 1994
    // out how to open it. I guess it's a secret door that will
2060 1995
    // only open for gravy fairies.
2061 -
    {
2062 -
      "only open for gravy fairies", "You need to bring an elemental gravy fairy with you.",
2063 -
    },
1996 +
    new AdventureFailure(
1997 +
        "only open for gravy fairies", "You need to bring an elemental gravy fairy with you."),
2064 1998
2065 1999
    // You shouldn't be here dressed like that. It's just not safe.
2066 -
    {
2067 -
      "You shouldn't be here dressed like that", "You can't pass as a pirate.",
2068 -
    },
2000 +
    new AdventureFailure("You shouldn't be here dressed like that", "You can't pass as a pirate."),
2069 2001
2070 2002
    // LOLmec's lair lies lempty. Empty.
2071 -
    {
2072 -
      "LOLmec's lair lies lempty", "You already beat LOLmec",
2073 -
    },
2003 +
    new AdventureFailure("LOLmec's lair lies lempty", "You already beat LOLmec"),
2074 2004
2075 2005
    // Already beat Yomama.
2076 -
    {
2077 -
      "Already beat Yomama", "You already beat Yomama",
2078 -
    },
2006 +
    new AdventureFailure("Already beat Yomama", "You already beat Yomama"),
2079 2007
2080 2008
    // The ghost has arrived. Your time has run out!
2081 -
    {
2082 -
      "The ghost has arrived", "Your tale of spelunking is over.",
2083 -
    },
2009 +
    new AdventureFailure("The ghost has arrived", "Your tale of spelunking is over."),
2084 2010
2085 2011
    // Gingerbread City
2086 -
    {
2087 -
      "The gingerbread city has collapsed.", "The gingerbread city has collapsed.",
2088 -
    },
2012 +
    new AdventureFailure(
2013 +
        "The gingerbread city has collapsed.", "The gingerbread city has collapsed."),
2089 2014
2090 2015
    // Hole in the sky
2091 2016
2092 2017
    // You can see it, but you can't get to it without some means of traveling...
2093 2018
    //
2094 2019
    // TO SPACE
2095 -
    {
2096 -
      "you can't get to it", "You need a way to travel in space.",
2097 -
    },
2020 +
    new AdventureFailure("you can't get to it", "You need a way to travel in space."),
2098 2021
2099 2022
    // The spacegate is out of energy for today. You can explore
2100 2023
    // another planet tomorrow. Or the same planet, if you
2101 2024
    // want. The spacegate isn't the boss of you.
2102 -
    {
2103 -
      "out of energy for today", "The Spacegate is out of energy for today.",
2104 -
    },
2025 +
    new AdventureFailure("out of energy for today", "The Spacegate is out of energy for today."),
2105 2026
2106 2027
    // ou approach the door to the spire, but you can't bear the
2107 2028
    // silence. Maybe you should try those earplugs Tammy gave you.
2108 -
    {
2109 -
      "you can't bear the silence", "You are not wearing your anti-earplugs..",
2110 -
    },
2029 +
    new AdventureFailure("you can't bear the silence", "You are not wearing your anti-earplugs.."),
2111 2030
2112 2031
    // You stomp around the spire for a while, but it looks like
2113 2032
    // this level is all cleared out. They'll probably redeploy
2114 2033
    // more mimes to it by tomorrow.
2115 -
    {
2116 -
      "redeploy more mimes to it by tomorrow", "There are no more mimes left today.",
2117 -
    },
2034 +
    new AdventureFailure(
2035 +
        "redeploy more mimes to it by tomorrow", "There are no more mimes left today."),
2118 2036
2119 2037
    // Your G. E. M. beeps at you, indicating that your time in FantasyRealm has come to an end for
2120 2038
    // today.
2121 -
    {
2122 -
      "your time in FantasyRealm has come to an end for today",
2123 -
      "Your time in FantasyRealm is over for today.",
2124 -
    },
2039 +
    new AdventureFailure(
2040 +
        "your time in FantasyRealm has come to an end for today",
2041 +
        "Your time in FantasyRealm is over for today."),
2125 2042
2126 2043
    // Technically the Neverending Party is still going, because the Neverending Party never ends,
2127 2044
    // but right now everybody is passed out, so it's more of a Neverending Nap.
2128 2045
    // It'll probably get rowdy again by tomorrow
2129 -
    {
2130 -
      "It'll probably get rowdy again by tomorrow", "The Neverending Party is over for today.",
2131 -
    },
2046 +
    new AdventureFailure(
2047 +
        "It'll probably get rowdy again by tomorrow", "The Neverending Party is over for today."),
2132 2048
2133 2049
    // You wouldn't be seen dead at the Neverending Party without your PARTY HARD shirt on.
2134 2050
    // Not today, at least, since you've already made an appearance in it.
2135 -
    {
2136 -
      "without your PARTY HARD shirt on",
2137 -
      "Cannot adventure at The Neverending Party without your PARTY HARD shirt on.",
2138 -
    },
2051 +
    new AdventureFailure(
2052 +
        "without your PARTY HARD shirt on",
2053 +
        "Cannot adventure at The Neverending Party without your PARTY HARD shirt on."),
2139 2054
2140 2055
    // That isn't a place you can get to the way you're dressed.
2141 2056
    // (Clicking Last Adventure having unequipped Talisman o' Namsilat)
2142 -
    {
2143 -
      "That isn't a place you can get to the way you're dressed",
2144 -
      "You're not equipped properly to adventure there.",
2145 -
    },
2057 +
    new AdventureFailure(
2058 +
        "That isn't a place you can get to the way you're dressed",
2059 +
        "You're not equipped properly to adventure there."),
2146 2060
2147 2061
    // If you got into a fight right now, you wouldn't be able to attack anything! Equip those boots
2148 2062
    // you found.
2149 -
    {
2150 -
      "Equip those boots you found", "Plumbers cannot adventure without appropriate gear.",
2151 -
    },
2063 +
    new AdventureFailure(
2064 +
        "Equip those boots you found", "Plumbers cannot adventure without appropriate gear."),
2152 2065
2153 2066
    // Something tells you the last bit of this is going to take a <i>long</i> time.  Come back when
2154 2067
    // you've got more Adventures to spare.
2155 -
    {
2156 -
      "going to take a <i>long</i> time", "You need 7 Adventures to fight Ed.",
2157 -
    },
2068 +
    new AdventureFailure("going to take a <i>long</i> time", "You need 7 Adventures to fight Ed."),
2158 2069
2159 2070
    // You can't go there because your Drippy Juice supply has run out.
2160 -
    {
2161 -
      "Drippy Juice supply", "You've run out of Drippy Juice.",
2162 -
    },
2071 +
    new AdventureFailure("Drippy Juice supply", "You've run out of Drippy Juice."),
2163 2072
2164 2073
    // Elemental Airport airplanes
2165 -
    {
2166 -
      "You don't know where that is", "You can't get there from here.",
2167 -
    },
2074 +
    new AdventureFailure("You don't know where that is", "You can't get there from here."),
2168 2075
2169 2076
    // That isn't a place you can go.
2170 -
    {
2171 -
      "That isn't a place you can go", "You can't get there from here.",
2172 -
    },
2077 +
    new AdventureFailure("That isn't a place you can go", "You can't get there from here."),
2173 2078
2174 2079
    // Site Alpha Dormitory
2175 2080
    //
2176 2081
    // It's getting colder! Better bundle up.
2177 2082
    // The extreme cold makes it impossible for you to continue...
2178 -
    {
2179 -
      "Better bundle up", "You need more cold resistance.",
2180 -
    },
2181 -
    {
2182 -
      "extreme cold makes it impossible", "You need more cold resistance.",
2183 -
    },
2184 -
    {
2185 -
      "This zone is too old to visit on this path.", "That zone is out of Standard.",
2186 -
    },
2083 +
    new AdventureFailure("Better bundle up", "You need more cold resistance."),
2084 +
    new AdventureFailure("extreme cold makes it impossible", "You need more cold resistance."),
2085 +
    new AdventureFailure(
2086 +
        "This zone is too old to visit on this path.", "That zone is out of Standard."),
2187 2087
  };
2188 2088
2189 2089
  private static Pattern CRIMBO21_COLD_RES =
@@ -2213,7 +2113,7 @@
Loading
2213 2113
    }
2214 2114
2215 2115
    for (int i = 1; i < ADVENTURE_FAILURES.length; ++i) {
2216 -
      if (responseText.contains((String) ADVENTURE_FAILURES[i][0])) {
2116 +
      if (responseText.contains(ADVENTURE_FAILURES[i].responseText)) {
2217 2117
        return i;
2218 2118
      }
2219 2119
    }
@@ -2223,15 +2123,15 @@
Loading
2223 2123
2224 2124
  public static final String adventureFailureMessage(int index) {
2225 2125
    if (index >= 0 && index < ADVENTURE_FAILURES.length) {
2226 -
      return (String) ADVENTURE_FAILURES[index][1];
2126 +
      return ADVENTURE_FAILURES[index].message;
2227 2127
    }
2228 2128
2229 2129
    return null;
2230 2130
  }
2231 2131
2232 2132
  public static final MafiaState adventureFailureSeverity(int index) {
2233 -
    if (index >= 0 && index < ADVENTURE_FAILURES.length && ADVENTURE_FAILURES[index].length > 2) {
2234 -
      return (MafiaState) ADVENTURE_FAILURES[index][2];
2133 +
    if (index >= 0 && index < ADVENTURE_FAILURES.length) {
2134 +
      return ADVENTURE_FAILURES[index].severity;
2235 2135
    }
2236 2136
2237 2137
    return MafiaState.ERROR;

@@ -707,56 +707,41 @@
Loading
707 707
    return null;
708 708
  }
709 709
710 -
  public static final Object[][] FISTCORE_SCROLLS = {
711 -
    // Adventure Zone
712 -
    // Adventure ID
713 -
    // Setting
714 -
    {
715 -
      "The Haiku Dungeon", AdventurePool.HAIKU_DUNGEON, "fistTeachingsHaikuDungeon",
716 -
    },
717 -
    {
718 -
      "The Poker Room", AdventurePool.POKER_ROOM, "fistTeachingsPokerRoom",
719 -
    },
720 -
    {
721 -
      "A Barroom Brawl", AdventurePool.BARROOM_BRAWL, "fistTeachingsBarroomBrawl",
722 -
    },
723 -
    {
724 -
      "The Haunted Conservatory", AdventurePool.HAUNTED_CONSERVATORY, "fistTeachingsConservatory",
725 -
    },
726 -
    {
727 -
      "The Bat Hole Entrance", AdventurePool.BAT_HOLE_ENTRYWAY, "fistTeachingsBatHole",
728 -
    },
729 -
    {
730 -
      "The \"Fun\" House", AdventurePool.FUN_HOUSE, "fistTeachingsFunHouse",
731 -
    },
732 -
    {
733 -
      "Cobb's Knob Menagerie Level 2", AdventurePool.MENAGERIE_LEVEL_2, "fistTeachingsMenagerie",
734 -
    },
735 -
    {
736 -
      "Pandamonium Slums", AdventurePool.PANDAMONIUM_SLUMS, "fistTeachingsSlums",
737 -
    },
738 -
    {
739 -
      "Frat House", AdventurePool.FRAT_HOUSE, "fistTeachingsFratHouse",
740 -
    },
741 -
    {
742 -
      "Road to the White Citadel", AdventurePool.ROAD_TO_WHITE_CITADEL, "fistTeachingsRoad",
743 -
    },
744 -
    {
745 -
      "Lair of the Ninja Snowmen", AdventurePool.NINJA_SNOWMEN, "fistTeachingsNinjaSnowmen",
746 -
    },
710 +
  private record FistcoreScroll(String zone, int adventureId, String setting) {}
711 +
712 +
  private static final FistcoreScroll[] FISTCORE_SCROLLS = {
713 +
    new FistcoreScroll(
714 +
        "The Haiku Dungeon", AdventurePool.HAIKU_DUNGEON, "fistTeachingsHaikuDungeon"),
715 +
    new FistcoreScroll("The Poker Room", AdventurePool.POKER_ROOM, "fistTeachingsPokerRoom"),
716 +
    new FistcoreScroll("A Barroom Brawl", AdventurePool.BARROOM_BRAWL, "fistTeachingsBarroomBrawl"),
717 +
    new FistcoreScroll(
718 +
        "The Haunted Conservatory",
719 +
        AdventurePool.HAUNTED_CONSERVATORY,
720 +
        "fistTeachingsConservatory"),
721 +
    new FistcoreScroll(
722 +
        "The Bat Hole Entrance", AdventurePool.BAT_HOLE_ENTRYWAY, "fistTeachingsBatHole"),
723 +
    new FistcoreScroll("The \"Fun\" House", AdventurePool.FUN_HOUSE, "fistTeachingsFunHouse"),
724 +
    new FistcoreScroll(
725 +
        "Cobb's Knob Menagerie Level 2", AdventurePool.MENAGERIE_LEVEL_2, "fistTeachingsMenagerie"),
726 +
    new FistcoreScroll("Pandamonium Slums", AdventurePool.PANDAMONIUM_SLUMS, "fistTeachingsSlums"),
727 +
    new FistcoreScroll("Frat House", AdventurePool.FRAT_HOUSE, "fistTeachingsFratHouse"),
728 +
    new FistcoreScroll(
729 +
        "Road to the White Citadel", AdventurePool.ROAD_TO_WHITE_CITADEL, "fistTeachingsRoad"),
730 +
    new FistcoreScroll(
731 +
        "Lair of the Ninja Snowmen", AdventurePool.NINJA_SNOWMEN, "fistTeachingsNinjaSnowmen"),
747 732
  };
748 733
749 -
  private static int fistcoreDataLocation(final Object[] data) {
750 -
    return (data == null) ? -1 : ((Integer) data[1]).intValue();
734 +
  private static int fistcoreDataLocation(final FistcoreScroll data) {
735 +
    return (data == null) ? -1 : data.adventureId;
751 736
  }
752 737
753 -
  private static String fistcoreDataSetting(final Object[] data) {
754 -
    return (data == null) ? null : ((String) data[2]);
738 +
  private static String fistcoreDataSetting(final FistcoreScroll data) {
739 +
    return (data == null) ? null : data.setting;
755 740
  }
756 741
757 -
  private static Object[] fistcoreLocationToData(final int location) {
742 +
  private static FistcoreScroll fistcoreLocationToData(final int location) {
758 743
    for (int i = 0; i < FISTCORE_SCROLLS.length; ++i) {
759 -
      Object[] data = FISTCORE_SCROLLS[i];
744 +
      var data = FISTCORE_SCROLLS[i];
760 745
      int loc = fistcoreDataLocation(data);
761 746
      if (location == loc) {
762 747
        return data;

@@ -9,6 +9,7 @@
Loading
9 9
import net.sourceforge.kolmafia.persistence.ConsumablesDatabase;
10 10
import net.sourceforge.kolmafia.persistence.EffectDatabase;
11 11
import net.sourceforge.kolmafia.persistence.ItemDatabase;
12 +
import net.sourceforge.kolmafia.persistence.ItemDatabase.Punchcard;
12 13
import net.sourceforge.kolmafia.persistence.ItemFinder;
13 14
import net.sourceforge.kolmafia.persistence.SkillDatabase;
14 15
import net.sourceforge.kolmafia.preferences.Preferences;
@@ -1198,9 +1199,9 @@
Loading
1198 1199
  }
1199 1200
1200 1201
  public static final String punchCardName(final int itemId) {
1201 -
    for (Object[] punchcard : ItemDatabase.PUNCHCARDS) {
1202 -
      if ((Integer) punchcard[0] == itemId) {
1203 -
        return (String) punchcard[2];
1202 +
    for (Punchcard punchcard : ItemDatabase.PUNCHCARDS) {
1203 +
      if (punchcard.id() == itemId) {
1204 +
        return punchcard.alias();
1204 1205
      }
1205 1206
    }
1206 1207

@@ -32,51 +32,47 @@
Loading
32 32
33 33
  private static final String LOCAL_ROOT = "/images/otherimages/bigisland/";
34 34
35 -
  private static final Object[][] IMAGES = {
36 -
    {
37 -
      Quest.JUNKYARD,
38 -
      IslandDecorator.LOCAL_ROOT + "2.gif",
39 -
      IslandDecorator.LOCAL_ROOT + "2F.gif",
40 -
      IslandDecorator.LOCAL_ROOT + "2H.gif",
41 -
    },
42 -
    {
43 -
      Quest.ORCHARD,
44 -
      IslandDecorator.LOCAL_ROOT + "3.gif",
45 -
      IslandDecorator.LOCAL_ROOT + "3F.gif",
46 -
      IslandDecorator.LOCAL_ROOT + "3H.gif",
47 -
    },
48 -
    {
49 -
      Quest.ARENA,
50 -
      IslandDecorator.LOCAL_ROOT + "6.gif",
51 -
      IslandDecorator.LOCAL_ROOT + "6F.gif",
52 -
      IslandDecorator.LOCAL_ROOT + "6H.gif",
53 -
    },
54 -
    {
55 -
      Quest.FARM,
56 -
      IslandDecorator.LOCAL_ROOT + "15.gif",
57 -
      IslandDecorator.LOCAL_ROOT + "15F.gif",
58 -
      IslandDecorator.LOCAL_ROOT + "15H.gif",
59 -
    },
60 -
    {
61 -
      Quest.LIGHTHOUSE,
62 -
      IslandDecorator.LOCAL_ROOT + "17.gif",
63 -
      IslandDecorator.LOCAL_ROOT + "17F.gif",
64 -
      IslandDecorator.LOCAL_ROOT + "17H.gif",
65 -
    },
66 -
    {
67 -
      Quest.NUNS,
68 -
      IslandDecorator.LOCAL_ROOT + "19.gif",
69 -
      IslandDecorator.LOCAL_ROOT + "19F.gif",
70 -
      IslandDecorator.LOCAL_ROOT + "19H.gif",
71 -
    },
35 +
  private record Image(Quest quest, String image, String frat, String hippy) {}
36 +
37 +
  private static final Image[] IMAGES = {
38 +
    new Image(
39 +
        Quest.JUNKYARD,
40 +
        IslandDecorator.LOCAL_ROOT + "2.gif",
41 +
        IslandDecorator.LOCAL_ROOT + "2F.gif",
42 +
        IslandDecorator.LOCAL_ROOT + "2H.gif"),
43 +
    new Image(
44 +
        Quest.ORCHARD,
45 +
        IslandDecorator.LOCAL_ROOT + "3.gif",
46 +
        IslandDecorator.LOCAL_ROOT + "3F.gif",
47 +
        IslandDecorator.LOCAL_ROOT + "3H.gif"),
48 +
    new Image(
49 +
        Quest.ARENA,
50 +
        IslandDecorator.LOCAL_ROOT + "6.gif",
51 +
        IslandDecorator.LOCAL_ROOT + "6F.gif",
52 +
        IslandDecorator.LOCAL_ROOT + "6H.gif"),
53 +
    new Image(
54 +
        Quest.FARM,
55 +
        IslandDecorator.LOCAL_ROOT + "15.gif",
56 +
        IslandDecorator.LOCAL_ROOT + "15F.gif",
57 +
        IslandDecorator.LOCAL_ROOT + "15H.gif"),
58 +
    new Image(
59 +
        Quest.LIGHTHOUSE,
60 +
        IslandDecorator.LOCAL_ROOT + "17.gif",
61 +
        IslandDecorator.LOCAL_ROOT + "17F.gif",
62 +
        IslandDecorator.LOCAL_ROOT + "17H.gif"),
63 +
    new Image(
64 +
        Quest.NUNS,
65 +
        IslandDecorator.LOCAL_ROOT + "19.gif",
66 +
        IslandDecorator.LOCAL_ROOT + "19F.gif",
67 +
        IslandDecorator.LOCAL_ROOT + "19H.gif"),
72 68
  };
73 69
74 70
  private IslandDecorator() {}
75 71
76 -
  private static Object[] findImages(final Quest quest) {
72 +
  private static Image findImages(final Quest quest) {
77 73
    for (int i = 0; i < IslandDecorator.IMAGES.length; ++i) {
78 -
      Object[] row = IslandDecorator.IMAGES[i];
79 -
      if (row[0] == quest) {
74 +
      Image row = IslandDecorator.IMAGES[i];
75 +
      if (row.quest == quest) {
80 76
        return row;
81 77
      }
82 78
    }
@@ -84,18 +80,18 @@
Loading
84 80
  }
85 81
86 82
  private static String originalImage(final Quest quest) {
87 -
    Object[] row = IslandDecorator.findImages(quest);
88 -
    return row == null ? "" : (String) (row[1]);
83 +
    Image row = IslandDecorator.findImages(quest);
84 +
    return row == null ? "" : row.image;
89 85
  }
90 86
91 87
  private static String fratImage(final Quest quest) {
92 -
    Object[] row = IslandDecorator.findImages(quest);
93 -
    return row == null ? "" : (String) (row[2]);
88 +
    Image row = IslandDecorator.findImages(quest);
89 +
    return row == null ? "" : row.frat;
94 90
  }
95 91
96 92
  private static String hippyImage(final Quest quest) {
97 -
    Object[] row = IslandDecorator.findImages(quest);
98 -
    return row == null ? "" : (String) (row[3]);
93 +
    Image row = IslandDecorator.findImages(quest);
94 +
    return row == null ? "" : row.hippy;
99 95
  }
100 96
101 97
  private static String sidequestImage(final String setting, final Quest quest) {

@@ -24,86 +24,76 @@
Loading
24 24
    return matcher.find() ? StringUtilities.parseInt(matcher.group(1)) : 0;
25 25
  }
26 26
27 -
  public static final Object[][] SERVANTS = {
28 -
    // Servant type
29 -
    // Canonical servant type
30 -
    // Servant ID
31 -
    // Image file name
32 -
    // Level 1 Power
33 -
    // Level 7 Power
34 -
    // Level 14 Power
35 -
    // Level 21 Power
36 -
37 -
    {
38 -
      "Cat",
39 -
      StringUtilities.getCanonicalName("Cat"),
40 -
      1,
41 -
      "edserv1.gif",
42 -
      "Gives unpleasant gifts",
43 -
      "Helps find items",
44 -
      "Lowers enemy stats",
45 -
      "Teaches you how to find items",
46 -
    },
47 -
    {
48 -
      "Belly-Dancer",
49 -
      StringUtilities.getCanonicalName("Belly-Dancer"),
50 -
      2,
51 -
      "edserv2.gif",
52 -
      "Lowers enemy stats",
53 -
      "Restores MP",
54 -
      "Picks pockets",
55 -
      "Teaches you how to restore MP",
56 -
    },
57 -
    {
58 -
      "Maid",
59 -
      StringUtilities.getCanonicalName("Maid"),
60 -
      3,
61 -
      "edserv3.gif",
62 -
      "Helps find meat",
63 -
      "Attacks enemies",
64 -
      "Prevents enemy attacks",
65 -
      "Teaches you how to find meat",
66 -
    },
67 -
    {
68 -
      "Bodyguard",
69 -
      StringUtilities.getCanonicalName("Bodyguard"),
70 -
      4,
71 -
      "edserv4.gif",
72 -
      "Prevents enemy attacks",
73 -
      "Attacks enemies",
74 -
      "Attacks enemies even when guarding",
75 -
      "Teaches you how to defend yourself",
76 -
    },
77 -
    {
78 -
      "Scribe",
79 -
      StringUtilities.getCanonicalName("Scribe"),
80 -
      5,
81 -
      "edserv5.gif",
82 -
      "Improves stat gains",
83 -
      "Improves spell crit",
84 -
      "Improves spell damage",
85 -
      "Teaches you how to improve stat gains",
86 -
    },
87 -
    {
88 -
      "Priest",
89 -
      StringUtilities.getCanonicalName("Priest"),
90 -
      6,
91 -
      "edserv6.gif",
92 -
      "Attacks undead enemies",
93 -
      "Improves evocation spells",
94 -
      "Improves Ka drops",
95 -
      "Teaches you how to improve spell damage",
96 -
    },
97 -
    {
98 -
      "Assassin",
99 -
      StringUtilities.getCanonicalName("Assassin"),
100 -
      7,
101 -
      "edserv7.gif",
102 -
      "Attacks enemies",
103 -
      "Lowers enemy stats",
104 -
      "Staggers enemies",
105 -
      "Teaches you how to improve physical attacks",
106 -
    },
27 +
  public record Servant(
28 +
      String type,
29 +
      int id,
30 +
      String filename,
31 +
      String level1Power,
32 +
      String level7Power,
33 +
      String level14Power,
34 +
      String level21Power) {
35 +
    public String canonicalType() {
36 +
      return StringUtilities.getCanonicalName(type);
37 +
    }
38 +
  }
39 +
40 +
  public static final Servant[] SERVANTS = {
41 +
    new Servant(
42 +
        "Cat",
43 +
        1,
44 +
        "edserv1.gif",
45 +
        "Gives unpleasant gifts",
46 +
        "Helps find items",
47 +
        "Lowers enemy stats",
48 +
        "Teaches you how to find items"),
49 +
    new Servant(
50 +
        "Belly-Dancer",
51 +
        2,
52 +
        "edserv2.gif",
53 +
        "Lowers enemy stats",
54 +
        "Restores MP",
55 +
        "Picks pockets",
56 +
        "Teaches you how to restore MP"),
57 +
    new Servant(
58 +
        "Maid",
59 +
        3,
60 +
        "edserv3.gif",
61 +
        "Helps find meat",
62 +
        "Attacks enemies",
63 +
        "Prevents enemy attacks",
64 +
        "Teaches you how to find meat"),
65 +
    new Servant(
66 +
        "Bodyguard",
67 +
        4,
68 +
        "edserv4.gif",
69 +
        "Prevents enemy attacks",
70 +
        "Attacks enemies",
71 +
        "Attacks enemies even when guarding",
72 +
        "Teaches you how to defend yourself"),
73 +
    new Servant(
74 +
        "Scribe",
75 +
        5,
76 +
        "edserv5.gif",
77 +
        "Improves stat gains",
78 +
        "Improves spell crit",
79 +
        "Improves spell damage",
80 +
        "Teaches you how to improve stat gains"),
81 +
    new Servant(
82 +
        "Priest",
83 +
        6,
84 +
        "edserv6.gif",
85 +
        "Attacks undead enemies",
86 +
        "Improves evocation spells",
87 +
        "Improves Ka drops",
88 +
        "Teaches you how to improve spell damage"),
89 +
    new Servant(
90 +
        "Assassin",
91 +
        7,
92 +
        "edserv7.gif",
93 +
        "Attacks enemies",
94 +
        "Lowers enemy stats",
95 +
        "Staggers enemies",
96 +
        "Teaches you how to improve physical attacks"),
107 97
  };
108 98
109 99
  public static final String[] SERVANT_ARRAY = new String[EdServantData.SERVANTS.length];
@@ -111,47 +101,47 @@
Loading
111 101
112 102
  static {
113 103
    for (int i = 0; i < EdServantData.SERVANT_ARRAY.length; ++i) {
114 -
      Object[] data = EdServantData.SERVANTS[i];
104 +
      Servant data = EdServantData.SERVANTS[i];
115 105
      EdServantData.SERVANT_ARRAY[i] = EdServantData.dataToType(data);
116 106
      EdServantData.CANONICAL_SERVANT_ARRAY[i] = EdServantData.dataToCanonicalType(data);
117 107
    }
118 108
    Arrays.sort(EdServantData.SERVANT_ARRAY);
119 109
  }
120 110
121 -
  public static String dataToType(Object[] data) {
122 -
    return data == null ? "" : (String) data[0];
111 +
  public static String dataToType(Servant data) {
112 +
    return data == null ? "" : data.type;
123 113
  }
124 114
125 -
  public static String dataToCanonicalType(Object[] data) {
126 -
    return data == null ? "" : (String) data[1];
115 +
  public static String dataToCanonicalType(Servant data) {
116 +
    return data == null ? "" : data.canonicalType();
127 117
  }
128 118
129 -
  public static int dataToId(Object[] data) {
130 -
    return data == null ? 0 : (Integer) data[2];
119 +
  public static int dataToId(Servant data) {
120 +
    return data == null ? 0 : data.id;
131 121
  }
132 122
133 -
  public static String dataToImage(Object[] data) {
134 -
    return data == null ? null : (String) data[3];
123 +
  public static String dataToImage(Servant data) {
124 +
    return data == null ? null : data.filename;
135 125
  }
136 126
137 -
  public static String dataToLevel1Ability(Object[] data) {
138 -
    return data == null ? null : (String) data[4];
127 +
  public static String dataToLevel1Ability(Servant data) {
128 +
    return data == null ? null : data.level1Power;
139 129
  }
140 130
141 -
  public static String dataToLevel7Ability(Object[] data) {
142 -
    return data == null ? null : (String) data[5];
131 +
  public static String dataToLevel7Ability(Servant data) {
132 +
    return data == null ? null : data.level7Power;
143 133
  }
144 134
145 -
  public static String dataToLevel14Ability(Object[] data) {
146 -
    return data == null ? null : (String) data[6];
135 +
  public static String dataToLevel14Ability(Servant data) {
136 +
    return data == null ? null : data.level14Power;
147 137
  }
148 138
149 -
  public static String dataToLevel21Ability(Object[] data) {
150 -
    return data == null ? null : (String) data[7];
139 +
  public static String dataToLevel21Ability(Servant data) {
140 +
    return data == null ? null : data.level21Power;
151 141
  }
152 142
153 -
  public static Object[] idToData(final int id) {
154 -
    for (Object[] data : EdServantData.SERVANTS) {
143 +
  public static Servant idToData(final int id) {
144 +
    for (Servant data : EdServantData.SERVANTS) {
155 145
      if (EdServantData.dataToId(data) == id) {
156 146
        return data;
157 147
      }
@@ -163,7 +153,7 @@
Loading
163 153
    return StringUtilities.getMatchingNames(EdServantData.CANONICAL_SERVANT_ARRAY, substring);
164 154
  }
165 155
166 -
  public static Object[] typeToData(final String type) {
156 +
  public static Servant typeToData(final String type) {
167 157
    // Do fuzzy matching
168 158
    List<String> matchingNames = EdServantData.getMatchingNames(type);
169 159
    if (matchingNames.size() != 1) {
@@ -171,7 +161,7 @@
Loading
171 161
    }
172 162
173 163
    String name = matchingNames.get(0);
174 -
    for (Object[] data : EdServantData.SERVANTS) {
164 +
    for (Servant data : EdServantData.SERVANTS) {
175 165
      if (name.equals(EdServantData.dataToCanonicalType(data))) {
176 166
        return data;
177 167
      }
@@ -186,7 +176,7 @@
Loading
186 176
187 177
  public static final EdServantData NO_SERVANT = new EdServantData(0);
188 178
189 -
  private final Object[] data;
179 +
  private final Servant data;
190 180
  private final String type;
191 181
  private final int id;
192 182
  private String name;
@@ -202,7 +192,7 @@
Loading
202 192
    EdServantData.currentEdServant = EdServantData.NO_SERVANT;
203 193
  }
204 194
205 -
  private EdServantData(final Object[] data) {
195 +
  private EdServantData(final Servant data) {
206 196
    this.data = data;
207 197
    this.type = EdServantData.dataToType(data);
208 198
    this.id = EdServantData.dataToId(data);
@@ -219,7 +209,7 @@
Loading
219 209
    this(EdServantData.idToData(id));
220 210
  }
221 211
222 -
  public Object[] getData() {
212 +
  public Servant getData() {
223 213
    return this.data;
224 214
  }
225 215
@@ -502,7 +492,7 @@
Loading
502 492
    // choice.php?whichchoice=1053&option=3&pwd&sid=6
503 493
    // choice.php?whichchoice=1053&option=5&pwd
504 494
    int sid = EdServantData.extractServantId(urlString);
505 -
    Object[] data = idToData(sid);
495 +
    Servant data = idToData(sid);
506 496
507 497
    switch (decision) {
508 498
      case 1: // Changing servant
@@ -522,7 +512,7 @@
Loading
522 512
    }
523 513
524 514
    int sid = EdServantData.extractServantId(urlString);
525 -
    Object[] data = idToData(sid);
515 +
    Servant data = idToData(sid);
526 516
    String servant = data == null ? "(unknown servant)" : EdServantData.dataToType(data);
527 517
528 518
    switch (decision) {

@@ -11,6 +11,7 @@
Loading
11 11
import net.sourceforge.kolmafia.CoinmasterData;
12 12
import net.sourceforge.kolmafia.CoinmasterRegistry;
13 13
import net.sourceforge.kolmafia.EdServantData;
14 +
import net.sourceforge.kolmafia.EdServantData.Servant;
14 15
import net.sourceforge.kolmafia.FamiliarData;
15 16
import net.sourceforge.kolmafia.KoLAdventure;
16 17
import net.sourceforge.kolmafia.KoLCharacter;
@@ -989,7 +990,7 @@
Loading
989 990
    }
990 991
991 992
    public int get_id() {
992 -
      Object[] data = (Object[]) this.content;
993 +
      Servant data = (Servant) this.content;
993 994
      return data == null ? 0 : EdServantData.dataToId(data);
994 995
    }
995 996
@@ -1009,27 +1010,27 @@
Loading
1009 1010
    }
1010 1011
1011 1012
    public String get_image() {
1012 -
      Object[] data = (Object[]) this.content;
1013 +
      Servant data = (Servant) this.content;
1013 1014
      return data == null ? "" : EdServantData.dataToImage(data);
1014 1015
    }
1015 1016
1016 1017
    public String get_level1_ability() {
1017 -
      Object[] data = (Object[]) this.content;
1018 +
      Servant data = (Servant) this.content;
1018 1019
      return data == null ? "" : EdServantData.dataToLevel1Ability(data);
1019 1020
    }
1020 1021
1021 1022
    public String get_level7_ability() {
1022 -
      Object[] data = (Object[]) this.content;
1023 +
      Servant data = (Servant) this.content;
1023 1024
      return data == null ? "" : EdServantData.dataToLevel7Ability(data);
1024 1025
    }
1025 1026
1026 1027
    public String get_level14_ability() {
1027 -
      Object[] data = (Object[]) this.content;
1028 +
      Servant data = (Servant) this.content;
1028 1029
      return data == null ? "" : EdServantData.dataToLevel14Ability(data);
1029 1030
    }
1030 1031
1031 1032
    public String get_level21_ability() {
1032 -
      Object[] data = (Object[]) this.content;
1033 +
      Servant data = (Servant) this.content;
1033 1034
      return data == null ? "" : EdServantData.dataToLevel21Ability(data);
1034 1035
    }
1035 1036
  }

@@ -7,6 +7,7 @@
Loading
7 7
import net.sourceforge.kolmafia.CoinmasterData;
8 8
import net.sourceforge.kolmafia.CoinmasterRegistry;
9 9
import net.sourceforge.kolmafia.EdServantData;
10 +
import net.sourceforge.kolmafia.EdServantData.Servant;
10 11
import net.sourceforge.kolmafia.FamiliarData;
11 12
import net.sourceforge.kolmafia.KoLAdventure;
12 13
import net.sourceforge.kolmafia.KoLCharacter;
@@ -610,7 +611,7 @@
Loading
610 611
      return DataTypes.SERVANT_INIT;
611 612
    }
612 613
613 -
    Object[] data = EdServantData.typeToData(name);
614 +
    Servant data = EdServantData.typeToData(name);
614 615
    if (data == null) {
615 616
      return returnDefault ? DataTypes.SERVANT_INIT : null;
616 617
    }
@@ -887,7 +888,7 @@
Loading
887 888
  }
888 889
889 890
  public static final Value makeServantValue(final int num, final boolean returnDefault) {
890 -
    Object[] data = EdServantData.idToData(num);
891 +
    Servant data = EdServantData.idToData(num);
891 892
    if (data == null) {
892 893
      return returnDefault ? DataTypes.SERVANT_INIT : null;
893 894
    }

@@ -809,85 +809,78 @@
Loading
809 809
    return -1;
810 810
  }
811 811
812 -
  private static final Object[][] demons = {
813 -
    {
814 -
      "Summoning Chamber",
815 -
      Pattern.compile("Did you say your name was (.*?)\\?"),
816 -
      "delicious-looking pies",
817 -
      "demonName1",
818 -
    },
819 -
    {
820 -
      "Hoom Hah", Pattern.compile("(.*?)! \\1, cooooome to meeeee!"), "fifty meat", "demonName2",
821 -
    },
822 -
    {
823 -
      "Every Seashell Has a Story to Tell If You're Listening",
824 -
      Pattern.compile("Hello\\? Is (.*?) there\\?"),
825 -
      "fish-guy",
826 -
      "demonName3",
827 -
    },
828 -
    {
829 -
      "Leavesdropping",
830 -
      Pattern.compile("(.*?), we call you! \\1, come to us!"),
831 -
      "bullwhip",
832 -
      "demonName4",
833 -
    },
834 -
    {
835 -
      "These Pipes... Aren't Clean!",
836 -
      Pattern.compile("Blurgle. (.*?). Gurgle. By the way,"),
837 -
      "coprodaemon",
838 -
      "demonName5",
839 -
    },
840 -
    {
841 -
      "Flying In Circles",
842 -
      // SC: Then his claws slip, and he falls
843 -
      // backwards.<p>"<Demon Name>!" he screams as he
844 -
      // tumbles backwards. "LORD OF REVENGE! GIVE ME
845 -
      // STRENGTH!"
846 -
      //
847 -
      // TT: With a scrape, her sickle slips from the
848 -
      // rock.<p>"<Demon Name>" she shrieks as she plummets
849 -
      // toward the lava. "Lord of Revenge! I accept your
850 -
      // contract! Give me your power!"
851 -
      //
852 -
      // PA: Its noodles lose their grip, and the evil
853 -
      // pastaspawn falls toward the churning
854 -
      // lava.<p><i>"<Demon Name>!"</i> it howls. "<i>Lord of
855 -
      // Revenge! Come to my aid!</i>"
856 -
      //
857 -
      // SA: As it falls, a mouth opens on its surface and
858 -
      // howls: "<Demon Name>! Revenge!"
859 -
      //
860 -
      // DB: His grip slips, and he falls.<p>"<Demon Name>!
861 -
      // Lord of Revenge! I call to you!  I pray to you! Help
862 -
      // m--"
863 -
      //
864 -
      // AT: His grip slips, and he tumbles
865 -
      // backward.<p>"<Demon Name>!" he screams. "Emperador
866 -
      // de la Venganza! Come to my aid!  I beg of you!"
867 -
868 -
      Pattern.compile(
869 -
          "(?:he falls backwards|her sickle slips from the rock|falls toward the churning lava|a mouth opens on its surface and howls|His grip slips, and he falls|he tumbles backward).*?(?:<i>)?&quot;(.*?)!?&quot;(?:</i>)?(?: he screams| she shrieks| it howls| Revenge| Lord of Revenge)"),
870 -
      "Lord of Revenge",
871 -
      "demonName8",
872 -
    },
873 -
    {
874 -
      "Sinister Ancient Tablet",
875 -
      Pattern.compile("<font.*?color=#cccccc>(.*?)</font>"),
876 -
      "flame-wreathed mouth",
877 -
      "demonName9",
878 -
    },
879 -
    {
880 -
      "Strange Cube",
881 -
      Pattern.compile("Come to me! Come to (.*?)!"),
882 -
      "writhing and twisting snake",
883 -
      "demonName10",
884 -
    },
885 -
    {
886 -
      "Where Have All The Drunkards Gone?",
887 -
      Pattern.compile("Is (.*?) a word?"),
888 -
      "Gary's friend",
889 -
      "demonName11",
890 -
    },
812 +
  record Demon(String place, Pattern pattern, String text, String setting) {}
813 +
814 +
  private static final Demon[] demons = {
815 +
    new Demon(
816 +
        "Summoning Chamber",
817 +
        Pattern.compile("Did you say your name was (.*?)\\?"),
818 +
        "delicious-looking pies",
819 +
        "demonName1"),
820 +
    new Demon(
821 +
        "Hoom Hah", Pattern.compile("(.*?)! \\1, cooooome to meeeee!"), "fifty meat", "demonName2"),
822 +
    new Demon(
823 +
        "Every Seashell Has a Story to Tell If You're Listening",
824 +
        Pattern.compile("Hello\\? Is (.*?) there\\?"),
825 +
        "fish-guy",
826 +
        "demonName3"),
827 +
    new Demon(
828 +
        "Leavesdropping",
829 +
        Pattern.compile("(.*?), we call you! \\1, come to us!"),
830 +
        "bullwhip",
831 +
        "demonName4"),
832 +
    new Demon(
833 +
        "These Pipes... Aren't Clean!",
834 +
        Pattern.compile("Blurgle. (.*?). Gurgle. By the way,"),
835 +
        "coprodaemon",
836 +
        "demonName5"),
837 +
    new Demon(
838 +
        "Flying In Circles",
839 +
        // SC: Then his claws slip, and he falls
840 +
        // backwards.<p>"<Demon Name>!" he screams as he
841 +
        // tumbles backwards. "LORD OF REVENGE! GIVE ME
842 +
        // STRENGTH!"
843 +
        //
844 +
        // TT: With a scrape, her sickle slips from the
845 +
        // rock.<p>"<Demon Name>" she shrieks as she plummets
846 +
        // toward the lava. "Lord of Revenge! I accept your
847 +
        // contract! Give me your power!"
848 +
        //
849 +
        // PA: Its noodles lose their grip, and the evil
850 +
        // pastaspawn falls toward the churning
851 +
        // lava.<p><i>"<Demon Name>!"</i> it howls. "<i>Lord of
852 +
        // Revenge! Come to my aid!</i>"
853 +
        //
854 +
        // SA: As it falls, a mouth opens on its surface and
855 +
        // howls: "<Demon Name>! Revenge!"
856 +
        //
857 +
        // DB: His grip slips, and he falls.<p>"<Demon Name>!
858 +
        // Lord of Revenge! I call to you!  I pray to you! Help
859 +
        // m--"
860 +
        //
861 +
        // AT: His grip slips, and he tumbles
862 +
        // backward.<p>"<Demon Name>!" he screams. "Emperador
863 +
        // de la Venganza! Come to my aid!  I beg of you!"
864 +
865 +
        Pattern.compile(
866 +
            "(?:he falls backwards|her sickle slips from the rock|falls toward the churning lava|a mouth opens on its surface and howls|His grip slips, and he falls|he tumbles backward).*?(?:<i>)?&quot;(.*?)!?&quot;(?:</i>)?(?: he screams| she shrieks| it howls| Revenge| Lord of Revenge)"),
867 +
        "Lord of Revenge",
868 +
        "demonName8"),
869 +
    new Demon(
870 +
        "Sinister Ancient Tablet",
871 +
        Pattern.compile("<font.*?color=#cccccc>(.*?)</font>"),
872 +
        "flame-wreathed mouth",
873 +
        "demonName9"),
874 +
    new Demon(
875 +
        "Strange Cube",
876 +
        Pattern.compile("Come to me! Come to (.*?)!"),
877 +
        "writhing and twisting snake",
878 +
        "demonName10"),
879 +
    new Demon(
880 +
        "Where Have All The Drunkards Gone?",
881 +
        Pattern.compile("Is (.*?) a word?"),
882 +
        "Gary's friend",
883 +
        "demonName11"),
891 884
  };
892 885
893 886
  private static final Pattern NAME_PATTERN = Pattern.compile("<b>&quot;(.*?)&quot;</b>");
@@ -898,19 +891,19 @@
Loading
898 891
    String setting = null;
899 892
900 893
    for (int i = 0; i < AdventureRequest.demons.length; ++i) {
901 -
      Object[] demons = AdventureRequest.demons[i];
902 -
      place = (String) demons[0];
894 +
      Demon demons = AdventureRequest.demons[i];
895 +
      place = demons.place;
903 896
      if (place == null || !place.equals(encounter)) {
904 897
        continue;
905 898
      }
906 899
907 -
      Pattern pattern = (Pattern) demons[1];
900 +
      Pattern pattern = demons.pattern;
908 901
      Matcher matcher = pattern.matcher(responseText);
909 902
910 903
      if (matcher.find()) {
911 904
        // We found the name
912 905
        demon = matcher.group(1);
913 -
        setting = (String) demons[3];
906 +
        setting = demons.setting;
914 907
      }
915 908
916 909
      break;
@@ -932,10 +925,10 @@
Loading
932 925
933 926
      // Look for tell-tale string
934 927
      for (int i = 0; i < AdventureRequest.demons.length; ++i) {
935 -
        Object[] demons = AdventureRequest.demons[i];
936 -
        String text = (String) demons[2];
928 +
        Demon demons = AdventureRequest.demons[i];
929 +
        String text = demons.text;
937 930
        if (responseText.contains(text)) {
938 -
          setting = (String) demons[3];
931 +
          setting = demons.setting;
939 932
          break;
940 933
        }
941 934
      }

@@ -32,6 +32,7 @@
Loading
32 32
import net.sourceforge.kolmafia.objectpool.EffectPool;
33 33
import net.sourceforge.kolmafia.objectpool.ItemPool;
34 34
import net.sourceforge.kolmafia.objectpool.SkillPool;
35 +
import net.sourceforge.kolmafia.persistence.ConsumablesDatabase.DustyBottle;
35 36
import net.sourceforge.kolmafia.preferences.Preferences;
36 37
import net.sourceforge.kolmafia.request.ApiRequest;
37 38
import net.sourceforge.kolmafia.request.ClanLoungeRequest;
@@ -78,62 +79,87 @@
Loading
78 79
  public static final String DISCARD_FLAG = "d";
79 80
  public static final String BOGUS_FLAG = "z";
80 81
81 -
  public static Object[][] PUNCHCARDS = {
82 +
  public record Punchcard(int id, String name, String alias) {}
83 +
84 +
  public static Punchcard[] PUNCHCARDS = {
82 85
    // Verbs
83 -
    {
84 -
      ItemPool.PUNCHCARD_ATTACK, "El Vibrato punchcard (115 holes)", "El Vibrato punchcard (ATTACK)"
85 -
    },
86 -
    {ItemPool.PUNCHCARD_REPAIR, "El Vibrato punchcard (97 holes)", "El Vibrato punchcard (REPAIR)"},
87 -
    {ItemPool.PUNCHCARD_BUFF, "El Vibrato punchcard (129 holes)", "El Vibrato punchcard (BUFF)"},
88 -
    {
89 -
      ItemPool.PUNCHCARD_MODIFY, "El Vibrato punchcard (213 holes)", "El Vibrato punchcard (MODIFY)"
90 -
    },
91 -
    {ItemPool.PUNCHCARD_BUILD, "El Vibrato punchcard (165 holes)", "El Vibrato punchcard (BUILD)"},
86 +
    new Punchcard(
87 +
        ItemPool.PUNCHCARD_ATTACK,
88 +
        "El Vibrato punchcard (115 holes)",
89 +
        "El Vibrato punchcard (ATTACK)"),
90 +
    new Punchcard(
91 +
        ItemPool.PUNCHCARD_REPAIR,
92 +
        "El Vibrato punchcard (97 holes)",
93 +
        "El Vibrato punchcard (REPAIR)"),
94 +
    new Punchcard(
95 +
        ItemPool.PUNCHCARD_BUFF, "El Vibrato punchcard (129 holes)", "El Vibrato punchcard (BUFF)"),
96 +
    new Punchcard(
97 +
        ItemPool.PUNCHCARD_MODIFY,
98 +
        "El Vibrato punchcard (213 holes)",
99 +
        "El Vibrato punchcard (MODIFY)"),
100 +
    new Punchcard(
101 +
        ItemPool.PUNCHCARD_BUILD,
102 +
        "El Vibrato punchcard (165 holes)",
103 +
        "El Vibrato punchcard (BUILD)"),
92 104
93 105
    // Objects
94 -
    {
95 -
      ItemPool.PUNCHCARD_TARGET, "El Vibrato punchcard (142 holes)", "El Vibrato punchcard (TARGET)"
96 -
    },
97 -
    {ItemPool.PUNCHCARD_SELF, "El Vibrato punchcard (216 holes)", "El Vibrato punchcard (SELF)"},
98 -
    {ItemPool.PUNCHCARD_FLOOR, "El Vibrato punchcard (88 holes)", "El Vibrato punchcard (FLOOR)"},
99 -
    {ItemPool.PUNCHCARD_DRONE, "El Vibrato punchcard (182 holes)", "El Vibrato punchcard (DRONE)"},
100 -
    {ItemPool.PUNCHCARD_WALL, "El Vibrato punchcard (176 holes)", "El Vibrato punchcard (WALL)"},
101 -
    {ItemPool.PUNCHCARD_SPHERE, "El Vibrato punchcard (104 holes)", "El Vibrato punchcard (SPHERE)"}
106 +
    new Punchcard(
107 +
        ItemPool.PUNCHCARD_TARGET,
108 +
        "El Vibrato punchcard (142 holes)",
109 +
        "El Vibrato punchcard (TARGET)"),
110 +
    new Punchcard(
111 +
        ItemPool.PUNCHCARD_SELF, "El Vibrato punchcard (216 holes)", "El Vibrato punchcard (SELF)"),
112 +
    new Punchcard(
113 +
        ItemPool.PUNCHCARD_FLOOR,
114 +
        "El Vibrato punchcard (88 holes)",
115 +
        "El Vibrato punchcard (FLOOR)"),
116 +
    new Punchcard(
117 +
        ItemPool.PUNCHCARD_DRONE,
118 +
        "El Vibrato punchcard (182 holes)",
119 +
        "El Vibrato punchcard (DRONE)"),
120 +
    new Punchcard(
121 +
        ItemPool.PUNCHCARD_WALL, "El Vibrato punchcard (176 holes)", "El Vibrato punchcard (WALL)"),
122 +
    new Punchcard(
123 +
        ItemPool.PUNCHCARD_SPHERE,
124 +
        "El Vibrato punchcard (104 holes)",
125 +
        "El Vibrato punchcard (SPHERE)")
102 126
  };
103 127
104 -
  private static final Object[][] ALIASES = {
105 -
    {ItemPool.BUGGED_BONNET, "bugged bonnet"},
106 -
    {ItemPool.BUGGED_MEAT_CLUB, "bugged meat stabbing club"},
107 -
    {ItemPool.BUGGED_POTION, "bugged Knob Goblin love potion"},
108 -
    {ItemPool.BUGGED_KNICKERBOCKERS, "bugged old school Mafia knickerbockers"},
109 -
    {ItemPool.BUGGED_BAIO, "bugged Talisman of Baio"},
110 -
    {ItemPool.UNBREAKABLE_UMBRELLA, "unbreakable umbrella (broken)"},
111 -
    {ItemPool.UNBREAKABLE_UMBRELLA, "unbreakable umbrella (forward-facing)"},
112 -
    {ItemPool.UNBREAKABLE_UMBRELLA, "unbreakable umbrella (bucket style)"},
113 -
    {ItemPool.UNBREAKABLE_UMBRELLA, "unbreakable umbrella (pitchfork style)"},
114 -
    {ItemPool.UNBREAKABLE_UMBRELLA, "unbreakable umbrella (constantly twirling)"},
115 -
    {ItemPool.UNBREAKABLE_UMBRELLA, "unbreakable umbrella (cocoon)"},
116 -
    {-1, "potion of inebriety"},
117 -
    {-1, "potion of healing"},
118 -
    {-1, "potion of confusion"},
119 -
    {-1, "potion of blessing"},
120 -
    {-1, "potion of detection"},
121 -
    {-1, "potion of sleepiness"},
122 -
    {-1, "potion of mental acuity"},
123 -
    {-1, "potion of ettin strength"},
124 -
    {-1, "potion of teleportitis"},
125 -
    {-1, "vial of slime: strong"},
126 -
    {-1, "vial of slime: sagacious"},
127 -
    {-1, "vial of slime: speedy"},
128 -
    {-1, "vial of slime: brawn"},
129 -
    {-1, "vial of slime: brains"},
130 -
    {-1, "vial of slime: briskness"},
131 -
    {-1, "vial of slime: slimeform"},
132 -
    {-1, "vial of slime: eyesight"},
133 -
    {-1, "vial of slime: intensity"},
134 -
    {-1, "vial of slime: muscle"},
135 -
    {-1, "vial of slime: mentalism"},
136 -
    {-1, "vial of slime: moxiousness"},
128 +
  private record Alias(int id, String name) {}
129 +
130 +
  private static final Alias[] ALIASES = {
131 +
    new Alias(ItemPool.BUGGED_BONNET, "bugged bonnet"),
132 +
    new Alias(ItemPool.BUGGED_MEAT_CLUB, "bugged meat stabbing club"),
133 +
    new Alias(ItemPool.BUGGED_POTION, "bugged Knob Goblin love potion"),
134 +
    new Alias(ItemPool.BUGGED_KNICKERBOCKERS, "bugged old school Mafia knickerbockers"),
135 +
    new Alias(ItemPool.BUGGED_BAIO, "bugged Talisman of Baio"),
136 +
    new Alias(ItemPool.UNBREAKABLE_UMBRELLA, "unbreakable umbrella (broken)"),
137 +
    new Alias(ItemPool.UNBREAKABLE_UMBRELLA, "unbreakable umbrella (forward-facing)"),
138 +
    new Alias(ItemPool.UNBREAKABLE_UMBRELLA, "unbreakable umbrella (bucket style)"),
139 +
    new Alias(ItemPool.UNBREAKABLE_UMBRELLA, "unbreakable umbrella (pitchfork style)"),
140 +
    new Alias(ItemPool.UNBREAKABLE_UMBRELLA, "unbreakable umbrella (constantly twirling)"),
141 +
    new Alias(ItemPool.UNBREAKABLE_UMBRELLA, "unbreakable umbrella (cocoon)"),
142 +
    new Alias(-1, "potion of inebriety"),
143 +
    new Alias(-1, "potion of healing"),
144 +
    new Alias(-1, "potion of confusion"),
145 +
    new Alias(-1, "potion of blessing"),
146 +
    new Alias(-1, "potion of detection"),
147 +
    new Alias(-1, "potion of sleepiness"),
148 +
    new Alias(-1, "potion of mental acuity"),
149 +
    new Alias(-1, "potion of ettin strength"),
150 +
    new Alias(-1, "potion of teleportitis"),
151 +
    new Alias(-1, "vial of slime: strong"),
152 +
    new Alias(-1, "vial of slime: sagacious"),
153 +
    new Alias(-1, "vial of slime: speedy"),
154 +
    new Alias(-1, "vial of slime: brawn"),
155 +
    new Alias(-1, "vial of slime: brains"),
156 +
    new Alias(-1, "vial of slime: briskness"),
157 +
    new Alias(-1, "vial of slime: slimeform"),
158 +
    new Alias(-1, "vial of slime: eyesight"),
159 +
    new Alias(-1, "vial of slime: intensity"),
160 +
    new Alias(-1, "vial of slime: muscle"),
161 +
    new Alias(-1, "vial of slime: mentalism"),
162 +
    new Alias(-1, "vial of slime: moxiousness"),
137 163
  };
138 164
139 165
  private static final List<String> ACCESS =
@@ -598,10 +624,10 @@
Loading
598 624
    ItemDatabase.addIdToName("worthless item", id);
599 625
600 626
    // Set aliases for the dusty bottles
601 -
    for (Object[] dusty : ConsumablesDatabase.DUSTY_BOTTLES) {
602 -
      id = (Integer) dusty[0];
603 -
      String name = StringUtilities.getCanonicalName((String) dusty[1]);
604 -
      String alias = StringUtilities.getCanonicalName((String) dusty[2]);
627 +
    for (DustyBottle dusty : ConsumablesDatabase.DUSTY_BOTTLES) {
628 +
      id = dusty.id();
629 +
      String name = StringUtilities.getCanonicalName(dusty.name());
630 +
      String alias = StringUtilities.getCanonicalName(dusty.alias());
605 631
      String plural = StringUtilities.singleStringReplace(alias, "bottle", "bottles");
606 632
      ItemDatabase.addIdToName(alias, id);
607 633
      ItemDatabase.itemIdByPlural.put(plural, id);
@@ -609,9 +635,9 @@
Loading
609 635
    }
610 636
611 637
    // Set aliases for the El Vibrato punch cards
612 -
    for (Object[] punchcard : ItemDatabase.PUNCHCARDS) {
613 -
      id = (Integer) punchcard[0];
614 -
      String alias = StringUtilities.getCanonicalName((String) punchcard[2]);
638 +
    for (Punchcard punchcard : ItemDatabase.PUNCHCARDS) {
639 +
      id = punchcard.id;
640 +
      String alias = StringUtilities.getCanonicalName(punchcard.alias);
615 641
      String plural = StringUtilities.singleStringReplace(alias, "punchcard", "punchcards");
616 642
      ItemDatabase.addIdToName(alias, id);
617 643
      ItemDatabase.itemIdByPlural.put(plural, id);
@@ -632,9 +658,9 @@
Loading
632 658
    }
633 659
634 660
    // Miscellaneous aliases for untypeable item names
635 -
    for (Object[] alias : ItemDatabase.ALIASES) {
636 -
      id = (Integer) alias[0];
637 -
      String name = StringUtilities.getCanonicalName((String) alias[1]);
661 +
    for (Alias alias : ItemDatabase.ALIASES) {
662 +
      id = alias.id;
663 +
      String name = StringUtilities.getCanonicalName(alias.name);
638 664
      ItemDatabase.addIdToName(name, id);
639 665
    }
640 666
  }

@@ -2,6 +2,7 @@
Loading
2 2
3 3
import java.io.File;
4 4
import net.sourceforge.kolmafia.EdServantData;
5 +
import net.sourceforge.kolmafia.EdServantData.Servant;
5 6
import net.sourceforge.kolmafia.KoLCharacter;
6 7
import net.sourceforge.kolmafia.KoLConstants.MafiaState;
7 8
import net.sourceforge.kolmafia.KoLmafia;
@@ -36,7 +37,7 @@
Loading
36 37
37 38
      String type = parameters.trim();
38 39
      if (!type.equals("")) {
39 -
        Object[] data = EdServantData.typeToData(type);
40 +
        Servant data = EdServantData.typeToData(type);
40 41
        if (data == null) {
41 42
          KoLmafia.updateDisplay(MafiaState.ERROR, "Ed has no servants of type \"" + type + "\".");
42 43
          return;
@@ -74,7 +75,7 @@
Loading
74 75
    output.append("<th>Abilities</th>");
75 76
    output.append("</tr>");
76 77
77 -
    for (Object[] data : EdServantData.SERVANTS) {
78 +
    for (Servant data : EdServantData.SERVANTS) {
78 79
      // Download the image
79 80
      String image = "itemimages/" + EdServantData.dataToImage(data);
80 81
      File file = FileUtilities.downloadImage(KoLmafia.imageServerPath() + image);

@@ -71,29 +71,29 @@
Loading
71 71
    }
72 72
  }
73 73
74 -
  public static Object[][] DUSTY_BOTTLES = {
75 -
    {
76 -
      ItemPool.DUSTY_BOTTLE_OF_MERLOT, "dusty bottle of Merlot", "dusty bottle of average Merlot",
77 -
    },
78 -
    {
79 -
      ItemPool.DUSTY_BOTTLE_OF_PORT, "dusty bottle of Port", "dusty bottle of vinegar Port",
80 -
    },
81 -
    {
82 -
      ItemPool.DUSTY_BOTTLE_OF_PINOT_NOIR,
83 -
      "dusty bottle of Pinot Noir",
84 -
      "dusty bottle of spooky Pinot Noir",
85 -
    },
86 -
    {
87 -
      ItemPool.DUSTY_BOTTLE_OF_ZINFANDEL,
88 -
      "dusty bottle of Zinfandel",
89 -
      "dusty bottle of great Zinfandel",
90 -
    },
91 -
    {
92 -
      ItemPool.DUSTY_BOTTLE_OF_MARSALA, "dusty bottle of Marsala", "dusty bottle of glassy Marsala",
93 -
    },
94 -
    {
95 -
      ItemPool.DUSTY_BOTTLE_OF_MUSCAT, "dusty bottle of Muscat", "dusty bottle of bad Muscat",
96 -
    }
74 +
  public record DustyBottle(int id, String name, String alias) {}
75 +
76 +
  public static DustyBottle[] DUSTY_BOTTLES = {
77 +
    new DustyBottle(
78 +
        ItemPool.DUSTY_BOTTLE_OF_MERLOT,
79 +
        "dusty bottle of Merlot",
80 +
        "dusty bottle of average Merlot"),
81 +
    new DustyBottle(
82 +
        ItemPool.DUSTY_BOTTLE_OF_PORT, "dusty bottle of Port", "dusty bottle of vinegar Port"),
83 +
    new DustyBottle(
84 +
        ItemPool.DUSTY_BOTTLE_OF_PINOT_NOIR,
85 +
        "dusty bottle of Pinot Noir",
86 +
        "dusty bottle of spooky Pinot Noir"),
87 +
    new DustyBottle(
88 +
        ItemPool.DUSTY_BOTTLE_OF_ZINFANDEL,
89 +
        "dusty bottle of Zinfandel",
90 +
        "dusty bottle of great Zinfandel"),
91 +
    new DustyBottle(
92 +
        ItemPool.DUSTY_BOTTLE_OF_MARSALA,
93 +
        "dusty bottle of Marsala",
94 +
        "dusty bottle of glassy Marsala"),
95 +
    new DustyBottle(
96 +
        ItemPool.DUSTY_BOTTLE_OF_MUSCAT, "dusty bottle of Muscat", "dusty bottle of bad Muscat")
97 97
  };
98 98
99 99
  private static final Map<String, String> muscleByName = new HashMap<String, String>();

@@ -34,6 +34,7 @@
Loading
34 34
import net.sourceforge.kolmafia.persistence.AdventureDatabase;
35 35
import net.sourceforge.kolmafia.persistence.BountyDatabase;
36 36
import net.sourceforge.kolmafia.persistence.ItemDatabase;
37 +
import net.sourceforge.kolmafia.persistence.ItemDatabase.Punchcard;
37 38
import net.sourceforge.kolmafia.persistence.MonsterDatabase;
38 39
import net.sourceforge.kolmafia.persistence.QuestDatabase;
39 40
import net.sourceforge.kolmafia.persistence.QuestDatabase.Quest;
@@ -1621,10 +1622,10 @@
Loading
1621 1622
      return;
1622 1623
    }
1623 1624
1624 -
    for (Object[] punchcard : ItemDatabase.PUNCHCARDS) {
1625 -
      String name = (String) punchcard[1];
1625 +
    for (Punchcard punchcard : ItemDatabase.PUNCHCARDS) {
1626 +
      String name = punchcard.name();
1626 1627
      if (buffer.indexOf(name) != -1) {
1627 -
        StringUtilities.globalStringReplace(buffer, name, (String) punchcard[2]);
1628 +
        StringUtilities.globalStringReplace(buffer, name, punchcard.alias());
1628 1629
      }
1629 1630
    }
1630 1631
  }
Files Complexity Coverage
src/net/sourceforge/kolmafia 20.25% 25.38%
Project Totals (1019 files) 20.25% 25.38%
coverage-windows-latest-java-17
Build #2531468714 -
JAVA=17
OS=windows-latest
coverage-ubuntu-latest-java-17
Build #2531468714 -
JAVA=17
OS=ubuntu-latest
coverage-macos-latest-java-17
Build #2531468714 -
JAVA=17
OS=macos-latest

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading