Blackheart's Bay

Wiki
  • Collect doubloons from treasure chests, mercenary camps, and slain enemy heroes.
  • Deliver enough doubloons to Blackheart's ghost ship and he bombards enemy structures with cannon fire.
  • The delivery cost starts at 8 doubloons and rises by 2 after each bombardment.
  • Slain heroes drop half their carried doubloons (rounded down) on the ground for anyone to pick up.

Objective Timers

EventDurationSecondsSource
First Chest Spawn1:3090slibBBAY_gv_mMBBCannonballsTreasureChestFirstTimerDur_C
Chest Respawn3:00180slibBBAY_gv_mMBBCannonballsTreasureChestTimerMid_C2

Doubloon Collection

Treasure chests drop 5 doubloons each, mercenary camps drop 2, and slain enemy heroes drop half of whatever they were carrying (rounded down) on the ground for anyone to pick up.


    }

    // Actions
    if (!runActions) {
        return true;
    }

    libBBAY_gv_mMBBDoubloonsCollected[lv_player] -= (lv_count / 2);
    libBBAY_gv_mMBBDoubloonsDropped[lv_player] += (lv_count / 2);
    libBBAY_gf_MMBBCannonballsSetHeroCannonballsCount(lv_player, lv_deadHero, (lv_count - (lv_count / 2)));
    libBBAY_gf_MMBBUpdateHeldDoubloonDisplay();
    if ((lv_count <= 0)) {
        return true;
    }

    lv_spawnLocation = libGame_gf_HeroKilledLocation();
    Wait(0.25, c_timeGame);

Turn-In & Escalating Cost

Delivering enough doubloons triggers a cannon bombardment. The cost starts at 8 and goes up by 2 after each delivery by that team, so the second turn-in costs 10, the third costs 12, and so on.


        }
    }
    return lv_total;
}

void libBBAY_gf_MMBBCannonballsSubmitReqIncrease (int lp_team) {
    // Automatic Variable Declarations
    // Implementation
    libBBAY_gv_mMBBCannonballsBallsSubmitMaxCurrent[lp_team] += libBBAY_gv_mMBBCannonballsBallsSubmitMaxInc_C;
}

void libBBAY_gf_MMBBCannonballsSetHeroCannonballsCount (int lp_player, unit lp_heroUnit, int lp_count) {
    // Variable Declarations
    int lv_numCannonballs;
    int lv_itPlayer;
    unit lv_unitGroupUnit;
    int lv_tempCount;

Cannon Target Selection

The ship fires 12 cannonballs at enemy Structures. Forts are hit before Keeps, and the Core only becomes a target once the other eligible Structures are gone.


    if ((UnitIsAlive(lv_townHall) == false)) {
        UnitGroupRemove(lv_buildings, UnitGroupUnit(libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(UnitTypeFromString("RagnarosBigRag"), "", "", c_playerAny, c_unitAllianceAny, libGame_gv_townTownData[lv_town].lv_townRegion, UnitFilter(0, (1 << (c_targetFilterAITargetableStructure - 32)), (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), 1));
        return UnitGroupRandomUnit(lv_buildings, c_unitCountAlive);
    }

    auto8F992C5C_g = lv_buildings;
    auto8F992C5C_u = UnitGroupCount(auto8F992C5C_g, c_unitCountAll);
    for (;; auto8F992C5C_u -= 1) {
        lv_itBuilding = UnitGroupUnitFromEnd(auto8F992C5C_g, auto8F992C5C_u);
        if (lv_itBuilding == null) { break; }
        if ((DistanceBetweenPoints(UnitGetPosition(lv_itBuilding), UnitGetPosition(lv_townHall)) > 10.0) && (UnitBehaviorCount(lv_itBuilding, "BattleshipBombardTarget") <= 0)) {
            UnitGroupAdd(lv_townOuterLoop, lv_itBuilding);
        }
        else {
            if ((lv_itBuilding != lv_townHall) && (UnitBehaviorCount(lv_itBuilding, "BattleshipBombardTarget") <= 0)) {
                UnitGroupAdd(lv_townInnerLoop, lv_itBuilding);
            }

        }
    }
    if ((libNtve_gf_UnitGroupIsDead(lv_townOuterLoop) == false)) {

Timer Source

libbbay_h.galaxy — constants

const fixed libBBAY_gv_mMBBCannonballsTreasureChestFirstTimerDur_C = 90.0;
const fixed libBBAY_gv_mMBBCannonballsTreasureChestTimerMid_C2 = 180.0;

libbbay.galaxy — timer start

    return TextExpressionAssemble("Param/Expression/lib_BBAY_79AE46CA");
}

void libBBAY_gf_MMBBCannonballsTreasureTheFirstTimer () {
    // Automatic Variable Declarations
    // Implementation
    TimerStart(libBBAY_gv_mMBBCannonballsTreasureChestTimer, libBBAY_gv_mMBBCannonballsTreasureChestFirstTimerDur_C, false, c_timeGame);
}

void libBBAY_gf_MMBBCannonballsTreasureStartTimer () {
    // Automatic Variable Declarations
    // Implementation
    TimerStart(libBBAY_gv_mMBBCannonballsTreasureChestTimer, libBBAY_gv_mMBBCannonballsTreasureChestTimerMid_C2, false, c_timeGame);
}

void libBBAY_gf_MMBBMapMechanicsBlackheartsBayShowHidePanel (bool lp_showHide) {
    // Automatic Variable Declarations
    // Implementation
    DialogControlSetVisible(libUIUI_gv_mapMechanicsPanel.lv_blackheartsBayPanel, libGame_gv_teams[libGame_gv_teamOrderIndex_C].lv_teamPlayerGroupNoNPCPlayers, lp_showHide);

Source Files