mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 08:52:42 +00:00
Combat engine §2(a): the enemy charges for what a seat brings
Both scaling levers counted seats. partyEnemyHPScale gave +15% boss HP for any roster >= 2, and partyActionExpectation lifted the enemy from 1 to 2.4 attacks a round. A seat COUNT charges the same for an under-levelled friend, a hired NPC, and a true peer — so a below-median body cost a full seat's worth of boss and did not give a full seat's worth back. Measured, once the companion's free full-heal was taken away and he became honest: hiring him was WORSE than going alone (66.1% against solo's 69.0%). That is this bug, and it has been live for every under-levelled friend anyone has ever invited. Seats now carry a SeatWeight, and both levers scale on the summed weight of the LIVING seats rather than on a head count. The weight is level-based, priced against the leader, times a discount for a hireling (no subclass, no magic items, gear that is never Masterwork — the layers a player accrues and a hireling never will). Level, and deliberately not a power score: an HP-x-damage proxy would rank a cleric below a fighter and quietly make every mixed HUMAN party easier, which is a difficulty regression smuggled in under a bug fix. The safety argument is one property: **a peer weighs exactly 1.0**. So the curves interpolate between the integer knots the P8 sweep tuned — (1, 1.0), (2, 2.4), 2n-1 from 3 up — and every integer input returns exactly what it always returned. Solo is byte-identical, a party of same-level humans is byte-identical, both goldens hold unmoved, and only an UNEQUAL roster lands between the knots. That is the entire point of the change. It also finishes §2(b): a seat that is down now buys the enemy nothing. §2(b) fixed the head-count half; a corpse still carried its full weight until this. Measured, 640 runs/arm, same grid: solo 69.0% (unchanged — corpus intact) + Pete 76.8% (+7.8pp) + a human cleric peer 77.6% (+8.6pp) band solo +Pete lift trailing (<40%) 10.0% 31.0% +21.0pp middle 58.9% 76.8% +17.9pp leading (>=70%) 93.5% 99.2% +5.7pp Help, never a carry: he rescues the players who were drowning and barely moves the ones who were already fine — and he stays below a real human of the leader's level, which is the invariant a hireling must never break. Claude-Session: https://claude.ai/code/session_01J5SQZWoLmL3M3mw2XmHHdy
This commit is contained in:
@@ -63,6 +63,10 @@ func (p *AdventurePlugin) runZoneCombatRoster(
|
||||
builds []seatBuild
|
||||
seated []id.UserID
|
||||
enemy Combatant
|
||||
// Parallel to players: what each seat is worth, priced once the roster is
|
||||
// final. A member who sat the encounter out is in none of these.
|
||||
levels []int
|
||||
companions []bool
|
||||
)
|
||||
|
||||
for i, uid := range roster {
|
||||
@@ -93,6 +97,7 @@ func (p *AdventurePlugin) runZoneCombatRoster(
|
||||
players = append(players, player)
|
||||
builds = append(builds, seatBuild{uid: uid, mods: player.Mods, companion: true})
|
||||
seated = append(seated, uid)
|
||||
levels, companions = append(levels, level), append(companions, true)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -154,8 +159,21 @@ func (p *AdventurePlugin) runZoneCombatRoster(
|
||||
uid: uid, dndChar: dndChar, advChar: advChar, equip: equip, mods: player.Mods,
|
||||
})
|
||||
seated = append(seated, uid)
|
||||
lvl := 0
|
||||
if dndChar != nil {
|
||||
lvl = dndChar.Level
|
||||
}
|
||||
levels, companions = append(levels, lvl), append(companions, false)
|
||||
}
|
||||
|
||||
// What each seat costs the enemy, priced against the leader — over the seats
|
||||
// that were actually seated, so a member left behind is not charged.
|
||||
ptrs := make([]*Combatant, len(players))
|
||||
for i := range players {
|
||||
ptrs[i] = &players[i]
|
||||
}
|
||||
applySeatWeights(ptrs, levels, companions)
|
||||
|
||||
res := simulateParty(players, enemy, phases)
|
||||
dumpCombatEventsIfDebug(
|
||||
fmt.Sprintf("zone:%s vs %s (%d seat(s))", monster.ID, players[0].Name, len(players)),
|
||||
|
||||
Reference in New Issue
Block a user