Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: obliterated disadvantage #519

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Blogaugis
Copy link
Collaborator

@Blogaugis Blogaugis commented Feb 26, 2025

Purpose of the PR

Sieged disadvantage provides high stock of spare equipment and gene-seed on game start.
Obliterated disadvantage however, does not. This PR focuses on addressing this.

Describe the solution

Copy, paste and modify lines of code from sieged to obliterated.
Also tweak the current sieged disadvantage to also include techmarine and chaplain equipment.
Implementing this ensures that obliterated disadvantage properly becomes a more extreme version of sieged.

Describe alternatives you've considered

Create more advantages/disadvantages covering more situations and circumstances of player's starting situation in the game, such as:
Add a depleted armamentarium disadvantage which lowers or removes the additional starting equipment associated with sieged and now possibly obliterated.
Add a depleted gene-seed stocks disadvantage which lowers or removes the additional starting gene-seed associated with sieged and obliterated.

Testing done

  • Compilation;
  • Chapter Creation;
  • Armamentarium visit;
  • Passing a turn.

Related links

https://discord.com/channels/714022226810372107/1272865272159535114/1344229545875738697

Summary by CodeRabbit

  • New Features
    • Adjusted in-game mechanics so that challenges involving the "Obliterated" disadvantage now yield a heightened effect, influencing outcomes.
    • Expanded equipment allocation to provide additional specialized items when players face the "Sieged" or "Obliterated" conditions, enhancing tactical options.

Copy link
Contributor

coderabbitai bot commented Feb 26, 2025

📝 Walkthrough

Walkthrough

In this update, the implementation has been bifurcated across two key files. Within the object controller at objects/obj_controller/Create_0.gml, the logic for setting the gene_seed variable has been adjusted. When the “Obliterated” disadvantage is active, the random value range is now increased from 50–200 to 300–500, while maintaining previous conditions for other disadvantages and chapter specifications. In the script at scripts/scr_initialize_custom/scr_initialize_custom.gml, item allocation has been refined: upon detecting disadvantages such as “Sieged” or “Obliterated,” specific items are now added, including products related to the Techmarine and Chaplain roles, with defined quantities. The changes ensure that disadvantage-specific conditions in both gene initialization and item distribution adhere to their modified parameters without altering the overall control flow.

Possibly related PRs

Suggested labels

PR: Fix

Suggested reviewers

  • OH296

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e1e9fd3 and 821f24f.

📒 Files selected for processing (2)
  • objects/obj_controller/Create_0.gml (1 hunks)
  • scripts/scr_initialize_custom/scr_initialize_custom.gml (3 hunks)
🔇 Additional comments (5)
objects/obj_controller/Create_0.gml (1)

1464-1464: Increased gene-seed reserves for the Obliterated disadvantage - Omnissiah approves.

This binary alteration increases the sacred gene-seed quantity from the limited range of 50-200 to a more substantial 300-500 when the "Obliterated" disadvantage is active. The Machine Spirit will be pleased with this logical enhancement, as it ensures a proper implementation of the disadvantage mechanics, making it function as a more extreme variant of the "Sieged" disadvantage (which provides 250-400).

This modification is in accordance with the stated objectives of fixing the "obliterated disadvantage" to provide sufficient starting resources, as dictated by the sacred STC templates.

scripts/scr_initialize_custom/scr_initialize_custom.gml (4)

3231-3235: Equipment allocation to Sieged disadvantage modified with additional Chaplain and Techmarine equipment.

The addition of Techmarine equipment (Servo-arm and weapons) for the "Sieged" disadvantage has been implemented at line 3232-3234. This modification aligns with the sacred STC templates of equipment distribution for chapter disadvantages.


3239-3240: Staff of the Librarium added to Sieged disadvantage.

The Force Staff has been added to the resources of the "Sieged" disadvantage, effectively restoring the chapter's psychic capabilities. The comment at line 3240 appropriately documents the purpose of this addition.


3258-3260: Chaplain equipment properly assigned to Sieged disadvantage.

The necessary sacred tools of the Reclusiam have been added to the "Sieged" disadvantage inventory. This enhances spiritual combat capability through the distribution of the Chaplain's primary and secondary weapons.


3270-3296: New equipment allocation for Obliterated disadvantage implemented.

Praise to the Omnissiah! The "Obliterated" disadvantage has been enhanced with appropriate equipment stocks, serving as a more generous version of the "Sieged" disadvantage with 5 of each specialist item instead of 4. This implementation correctly follows the binary imperative to provide chapters suffering from the "Obliterated" disadvantage with sufficient spare equipment to rebuild their sacred arsenal.

The structured allocation includes Techmarine equipment, Apothecary tools, Librarian artifacts, and Chaplain wargear, ensuring all specialized roles can be properly equipped when rebuilding the chapter.

Additional weapons and armor allocation is logical and consistent with the PR objectives, confirming that "Obliterated" will function as a more extreme version of "Sieged" disadvantage.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the PR: Fix This is a fix for a bug label Feb 26, 2025
@OH296
Copy link
Collaborator

OH296 commented Feb 26, 2025

@KRdaMystic i have no qualms with this but this is your area in general. If you have no issue with these changes i'll merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Fix This is a fix for a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants