Skip to content

Add Charge elemental charge script to charge elemental charge for Warrior Mages#7300

Merged
MahtraDR merged 5 commits intoelanthia-online:mainfrom
Elysande1218:charge-elemental-charge
Apr 25, 2026
Merged

Add Charge elemental charge script to charge elemental charge for Warrior Mages#7300
MahtraDR merged 5 commits intoelanthia-online:mainfrom
Elysande1218:charge-elemental-charge

Conversation

@Elysande1218
Copy link
Copy Markdown
Contributor

@Elysande1218 Elysande1218 commented Feb 18, 2026

Script allows a warrior mage to charge their elemental charge to a specific level in a specific room.


Important

Add charge-elemental-charge.lic script for Warrior Mages to automate charging elemental charge to a specified level in a specified room.

  • Behavior:
    • New script charge-elemental-charge.lic for Warrior Mages to charge elemental charge to a specified level in a specified room.
    • Uses Summoning class to automate charging process.
  • Classes & Methods:
    • Summoning class initializes with settings for elemental_charge_minimum_level and elemental_charge_room.
    • initialize method walks to the charging room and starts charging.
    • done_charging? method checks if the elemental charge is at or above the minimum level.
    • charge_elemental_charge method performs the charging loop until the desired level is reached.

This description was created by Ellipsis for e047e14. You can customize this summary. It will automatically update as commits are pushed.

Copy link
Copy Markdown
Contributor

@ellipsis-dev ellipsis-dev Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to e047e14 in 13 seconds. Click for details.
  • Reviewed 35 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_2tiZIcF6FI4qC7nL

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

Copy link
Copy Markdown
Contributor Author

@Elysande1218 Elysande1218 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the line that was causing the failure

Elysande1218 and others added 2 commits February 20, 2026 17:59
- Rename class from Summoning to ChargeElementalCharge to avoid
  overwriting the existing Summoning class in summoning.lic
- Replace raw fput('summon admittance')/waitrt? with
  DRCS.summon_admittance which has proper error handling (retreat on
  distracted, pause, waitrt, fix_standing) and prevents busy-looping
- Add nil guard for elemental_charge_room with user-facing message
- Remove fput('stand') since DRCS.summon_admittance calls fix_standing
- Add specs covering charge level checks, summon loop, class naming,
  and nil room guard

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@MahtraDR
Copy link
Copy Markdown
Collaborator

Updated description (post-review fixes applied)

This script automates charging elemental charge for Warrior Mages. It walks to a configured room and loops summon admittance until the charge reaches a target level.

Fixes applied

The following issues were identified during review and have been fixed in the latest commit:

  1. Class renamed from Summoning to ChargeElementalCharge: The repo already has a class Summoning in summoning.lic. Using the same name would overwrite that class at load time, breaking the existing summoning training script.

  2. Replaced raw fput/waitrt? with DRCS.summon_admittance: The original loop used fput('summon admittance') followed by waitrt?. If the command failed (wrong room, no mana, etc.), there would be no roundtime, so waitrt? returned instantly and the loop would spam the game server. DRCS.summon_admittance handles errors properly -- it retreats on "too distracted", pauses between attempts, waits for roundtime, and calls fix_standing.

  3. Added nil guard for elemental_charge_room: If the setting is not configured in the user's YAML, the script now prints a message and exits instead of silently calling DRCT.walk_to(nil) (which returns false and starts summoning in the wrong room).

  4. Removed fput('stand') at end: DRCS.summon_admittance already calls DRC.fix_standing after each summon, making this redundant.

YAML settings

elemental_charge_minimum_level: 6    # Target charge level (0-11, default: 6)
elemental_charge_room: 1234          # Room ID to walk to for charging (required)

Test coverage

7 specs added in spec/charge_elemental_charge_spec.rb:

  • Charge level checks (below/at/above minimum)
  • Summon loop count (calls summon_admittance correct number of times)
  • Already-charged skip (no summon calls when charge is sufficient)
  • Class naming (confirms ChargeElementalCharge, not Summoning)
  • Nil room guard (returns early with message when room not set)

@MahtraDR MahtraDR merged commit 958a627 into elanthia-online:main Apr 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants