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

refactor: Data-driven psychic power system #424

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

EttyKitty
Copy link
Collaborator

@EttyKitty EttyKitty commented Jan 14, 2025

Description of changes

  • Added support for tomes with different disciplines and perils.
  • Replaced hardcoded psychic powers with a data structure.
  • Simplified power selection logic.
  • Improved Perils of the Warp calculations.

Reasons for changes

Related links

How have you tested your changes?

  • Compile
  • New game
  • Next turn
  • Space Travel
  • Ground Battle

Copy link
Contributor

sourcery-ai bot commented Jan 14, 2025

Reviewer's Guide by Sourcery

This pull request refactors the psychic power system to be data-driven, making it more flexible and easier to maintain. It introduces a new data structure to define psychic powers and their effects, and updates the scr_powers function to use this data structure. It also removes some unused variables and simplifies the logic for determining the target of a power.

File-Level Changes

Change Details Files
Refactored psychic power system to use data structures
  • Replaced power selection logic with data structure lookups
  • Introduced data structure to define psychic powers and their effects
  • Removed unused variables
  • Simplified target selection logic
scripts/scr_powers/scr_powers.gml
Updated Perils of the Warp mechanic
  • Adjusted global perils value calculation
  • Modified Perils of the Warp effects
scripts/scr_perils_table/scr_perils_table.gml
objects/obj_ncombat/KeyPress_13.gml
Updated artifact generation
  • Changed artifact tag generation for daemonic weapons and tomes
scripts/scr_add_artifact/scr_add_artifact.gml
Removed large text and heresy settings
  • Removed drawing and handling of large text and heresy settings in the in-game menu
objects/obj_ingame_menu/Draw_0.gml
Adjusted button drawing calculations
  • Modified button size calculations to use a fixed padding value
scripts/scr_buttons/scr_buttons.gml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@github-actions github-actions bot added PR: Refactor Rewriting/restructuring code, while keeping general behaviour PR: Major Coding Big enough to possibly clash with other PRs labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Major Coding Big enough to possibly clash with other PRs PR: Refactor Rewriting/restructuring code, while keeping general behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant