Skip to content

Commit 2cb165b

Browse files
MahtraDRclaude
andauthored
fix(combat-trainer): tie gem pouch at 70 gems instead of swapping (elanthia-online#7356)
## Summary - The game message "You'd better tie it up before putting" fires at 70 gems, meaning the pouch just needs tying to keep filling (up to 500 gems). Previously this was grouped into the `pouch-full` flag, triggering a full pouch swap -- drop gem, remove pouch, stow it, get spare, wear spare, fail to tie the empty one. - Split into a separate `pouch-needs-tie` flag that simply ties the current pouch and re-stows the gem. ## Test plan - [ ] Verify pouch tie at 70 gems: stow gem triggers tie + re-stow, no swap - [ ] Verify pouch full at 500 gems: swap behavior unchanged - [ ] Verify `pouch-needs-tie` flag cleanup on script exit 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent af380d9 commit 2cb165b

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

combat-trainer.lic

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,8 @@ class LootProcess
606606
end
607607

608608
Flags.add('using-corpse', 'begins arranging', 'completes arranging', 'kneels down briefly and draws a knife', 'cruelly into the body and carving out a chunk', 'makes additional cuts, purposeful but seemingly at random')
609-
Flags.add('pouch-full', 'You think the .* is too full to fit another gem into', /You'd better tie it up before putting/)
609+
Flags.add('pouch-full', 'You think the .* is too full to fit another gem into')
610+
Flags.add('pouch-needs-tie', /You'd better tie it up before putting/)
610611
Flags.add('container-full', 'There isn\'t any more room')
611612
Flags.add('ct-successful-skin', '^You carefully fit .* into your bundle')
612613
end
@@ -695,6 +696,7 @@ class LootProcess
695696

696697
def stow_loot(item, game_state)
697698
Flags.reset('pouch-full')
699+
Flags.reset('pouch-needs-tie')
698700
Flags.reset('container-full')
699701

700702
special = @loot_specials.find { |x| x['name'] == item }
@@ -721,6 +723,15 @@ class LootProcess
721723
game_state.unlootable(item)
722724
end
723725

726+
# Pouch just needs tying -- tie it and re-stow the gem
727+
if Flags['pouch-needs-tie']
728+
DRCI.tie_gem_pouch?(@gem_pouch_adjective, @gem_pouch_noun)
729+
in_hand = [GameObj.right_hand, GameObj.left_hand].find { |hand| hand&.noun == item.split.last }
730+
stow_target = in_hand ? "my #{in_hand.noun}" : item
731+
DRC.bput("stow #{stow_target}", 'You pick up', 'You put', 'You get', 'You need a free hand', "You just can't", 'push you over the item limit', 'Stow what', 'already in your inventory')
732+
return
733+
end
734+
724735
return unless Flags['pouch-full']
725736

726737
DRC.bput("drop my #{item}", 'You drop', 'What were')
@@ -6020,6 +6031,7 @@ before_dying do
60206031
fput("release spell") if XMLData.prepared_spell
60216032
Flags.delete('using-corpse')
60226033
Flags.delete('pouch-full')
6034+
Flags.delete('pouch-needs-tie')
60236035
Flags.delete('container-full')
60246036
Flags.delete('ct-successful-skin')
60256037
Flags.delete('ct-lodged')

0 commit comments

Comments
 (0)